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

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

1 2 |

`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 |

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

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.

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

Peng He

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.

`predict.crrwt`

,`print.crrwt`

,`summary.crrwt`

,`crr.wt.KM`

,`crr.wt.COX`

,`crr.wt.KM.str`

,`crr.wt.COX.str`

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

```
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
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.