estCompRisksGEE: GEE Model Fitting For Competing Risks

View source: R/DiscSurvEstimationCR.R

predict.dCRGEER Documentation

GEE Model Fitting For Competing Risks

Description

Estimates generalized estimation equation model for each competing event separately. Dependence within person IDs is accounted for by assuming a working covariance structure.

Usage

## S3 method for class 'dCRGEE'
predict(object, newdata, ...)

estCompRisksGEE(
  dataShort,
  dataTransform = "dataLongCompRisks",
  corstr = "independence",
  formulaVariable = ~timeInt,
  storeAugData = TRUE,
  ...
)

Arguments

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 dataLongCompRisks or dataLongCompRisksTimeDep. Preprocessing function argument responseAsFactor has to be set to FALSE (Default).

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".

Details

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.

Value

Returns an object of class "geeglm".

Author(s)

Thomas Welchowski t.welchowski@psychologie.uzh.ch

References

\insertRef

minjungDiscCompdiscSurv

See Also

covarGEE, dataLongCompRisks, dataLongCompRisksTimeDep, geeglm

Examples


# 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)


discSurv documentation built on April 29, 2026, 9:07 a.m.