View source: R/DiscSurvEstimationCR.R
| predict.dCRGEE | R Documentation |
Estimates generalized estimation equation model for each competing event separately. Dependence within person IDs is accounted for by assuming a working covariance structure.
## S3 method for class 'dCRGEE'
predict(object, newdata, ...)
estCompRisksGEE(
dataShort,
dataTransform = "dataLongCompRisks",
corstr = "independence",
formulaVariable = ~timeInt,
storeAugData = TRUE,
...
)
object |
Discrete time competing risks GEE model prediction model (class "dCRGEE"). |
newdata |
New data set to be used for prediction (class "data.frame"). |
... |
Additional arguments to data transformation
functions |
dataShort |
Original data set in short format with each row corresponding to one independent observation (class "data.frame"). |
dataTransform |
Specification of the data transformation function from short to long format (class "character"). There are two available options: Without time dependent covariates ("dataLongCompRisks") and with time dependent covariates ("dataLongCompRisksTimeDep"). The default is set to the former. |
corstr |
Assumption of correlation structure (class "character"). The following are permitted: '"independence"', '"exchangeable"', '"ar1"', '"unstructured"' and '"userdefined". |
formulaVariable |
Specifies the right hand side of the regression formula (class "formula"). The default is to use the discrete time variable, which corresponds to a covariate free hazard. It is recommended to always include the discrete time variable "timeInt". |
storeAugData |
Should the augmented data set be saved (class "logical")? Defaults is TRUE. The data set is available as attribute "augData". |
Variables in argument formulaVariable need to be separated by "+ ". For example if the two variables timeInt and X1 should be included the formula would be "~ timeInt + X1". The variable timeInt is constructed before estimation of the model.
Returns an object of class "geeglm".
Thomas Welchowski t.welchowski@psychologie.uzh.ch
minjungDiscCompdiscSurv
covarGEE, dataLongCompRisks, dataLongCompRisksTimeDep,
geeglm
# Example with unemployment data
library(Ecdat)
data(UnempDur)
# Select subsample
SubUnempDur <- UnempDur [1:100, ]
# Estimate GEE models for all events
estGEE <- estCompRisksGEE(dataShort = SubUnempDur, dataTransform = "dataLongCompRisks",
corstr = "independence", formulaVariable =~ timeInt + age + ui + logwage * ui,
eventColumns = c("censor1", "censor2", "censor3", "censor4"), timeColumn = "spell")
names(estGEE)
estGEE[[1]]
# Predictions
SubUnempDurLong <- dataLongCompRisks(dataShort = SubUnempDur,
eventColumns = c("censor1", "censor2", "censor3", "censor4"), timeColumn = "spell")
preds <- predict(estGEE, newdata = SubUnempDurLong)
head(preds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.