crr.wt: Competing risks regression using different weights.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Regression modeling of subdistribution functions in competing risks with adjustments for covariate-dependent censoring.

Usage

1
2
crr.wt(formula, data, weight = c("KM", "COX", "KM.Strata", "COX.Strata"), cens.formula, 
cause = 1, strata.var, variance = TRUE, var.conservative = FALSE)

Arguments

formula

a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a competing risks object as returned by the Crsk function.

data

a data.frame in which to interpret the variables named in the formula.

weight

type of weight for modeling. "KM" - Kaplan-Meier weight. "COX" - Cox regression adjusted weight. "KM.strata" - stratified Kaplan-Meier adjusted weight. "COX.strata" - stratified COX regression adjusted weight.

cens.formula

a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a censoring object in the format of Cens(t,ic). This option is needed only for weight="COX" or weight="COX.strata". See the example for more details

cause

code of cause that is of interest.

strata.var

a categorical stratification variable, needed only for weight="KM.strata" or weight="COX.strata".

variance

Includes variance calculation if TRUE, Skips variance calculation if FALSE.

var.conservative

Includes minor term of variance of beta if FALSE, no minor term for variance of beta if TRUE.

Details

Fits the subdistribution hazards regression model with adjustments to covariate-dependent censoring as described in He et al. (2013). In addition, this function includes two new weights - "KM.strata" and "COX.strata" for fitting stratified models for the censoring distribution. strata.var is an option for users to specify the stratification variable, which has to be categorical with levels. When fitting the regression model using the "COX.strata" weight, the stratification variable cannot be included in your censoring-dependent covariates set. If cens.formula was not specified but either "COX" or "COX.strata" weight was used, by default the function uses "z" as the set of covariates for cens.formula with necessary removal of the specified stratification variable.

Return values W.lambda and W.beta are used for prediction calculations. Incomplete observations are removed before the model fitting.

Value

weight

type of weight used for modeling the censoring distribution.

varname

covariate names.

converge

1 if the iterative algorithm coverged. 0 if not.

cens.det

for weight="COX" and weight="COX.strata" only, 0 if there is a problem with the determinant of the information matrix when fitting the censoring distribution, 1 if no problem with determinant.

beta

estimated regression coefficients.

beta_se

estimated standard errors for regression coefficients.

time

a vector of observed failure times

a10

a vector of estimated cumulative baseline subdistribution hazards at observed failure times.

a10se

a vector of estimated standard errors for estimated cumulative baseline subdistribution hazards.

W_lambda

used for prediction function.

W_beta

used for prediction function.

n

total number of observations.

n.missing

number of observations with missing values.

Author(s)

Peng He

References

He P, Scheike TH and Zhang MJ, A proportional hazards regression model for the subdistribution with covariates adjusted censoring weight for competing risks data, Technical Report #61, Division of Biostatistics, Medical College of Wisconsin, November 2013.

See Also

predict.crrwt,print.crrwt,summary.crrwt,crr.wt.KM,crr.wt.COX,crr.wt.KM.str,crr.wt.COX.str

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Simulated data
set.seed(123321)
t <- rexp(200)
ic <- sample(0:2,200,replace=TRUE)
z <- matrix(runif(600),nrow=200)
colnames(z) <- c("z1","z2","z3")
dat <- data.frame(t,ic,z)

# Model fitting with a Kaplan-Meier weight
print(out.KM <- crr.wt(Crsk(t,ic)~z1+z2+z3,data=dat,weight="KM",cause=1))

# Model fitting with a Cox weight
print(out.COX <- crr.wt(Crsk(t,ic)~z1+z2+z3,data=dat,weight="COX",cause=1,Cens(t,ic)~z1+z2))

# Summary information
summary(out.COX)

# Prediction of cumulative incidence proability
newdata <- data.frame(c(.2,.3,.5),c(.9,.1,.6),c(.3,.9,.2))
colnames(newdata) <- c("z1","z2","z3")
pred.COX <- predict(out.COX,z=newdata)

# Plots of prediction
plot(pred.COX)
plot(pred.COX,multiple=1)
plot(pred.COX,multiple=1,se=1)

Example output

coefficients:
[1]  0.9792  0.7730 -0.3562
standard errors:
[1] 0.4330 0.3906 0.4423
coefficients:
[1]  0.9143  0.7976 -0.3538
standard errors:
[1] 0.4319 0.3889 0.4426

 Summary results: 

 Number of total observations:     200 
 Number of missing observations:   0 
 Number of observations used:      200 

     beta se(beta) exp(beta) 95% CI lower 95% CI upper      Z p-value
z1  0.914    0.432     2.495        1.070        5.817  2.117   0.034
z2  0.798    0.389     2.220        1.036        4.758  2.051   0.040
z3 -0.354    0.443     0.702        0.295        1.671 -0.799   0.424

 Censoring distribution was modeled via Cox regression 

wtcrsk documentation built on Jan. 15, 2017, 10:50 p.m.