compRisksGEE: GEE model for discrete competing risks

View source: R/DiscSurvEstimation.R

compRisksGEER Documentation

GEE model for discrete 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

compRisksGEE(
  datShort,
  dataTransform = "dataLongCompRisks",
  corstr = "independence",
  formulaVariable = ~timeInt,
  ...
)

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

Arguments

datShort

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("character vector"). 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 ("character vector"). 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".

...

Additional arguments to data transformation (compRisksGEE) or prediction function (predict). Preprocessing function argument responseAsFactor has to be set to FALSE (Default).

object

Discrete time competing risks GEE model prediction model ("class dCRGEE").

newdata

("class data.set") New data set to be used for prediction (class data.frame).

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 welchow@imbie.meb.uni-bonn.de

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 <- compRisksGEE(datShort = 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 March 18, 2022, 7:12 p.m.