standardize.prodlim: Standardize absolute risks In tagteam/heaven: Data Preparation Routines for Medical Registry Data

Description

Compute standardized absolute risks based on a stratified Kaplan-Meier or Aalen-Johansen estimate

Usage

 `1` ```standardize.prodlim(object, var1, var2, times, data, weights, ...) ```

Arguments

 `object` Object obtained with `prodlim` stratified with two categorical covariates. `var1` Name of one of the two categorical variables. The absolute risks are standardized within the levels of this variables to the distribution of the other categorical variable in the full data. `var2` Name of the other of the two categorical variables, i.e., the one on which the weights are based. `times` Compute absolute risks at these time points `data` Only if weights are not given. Data set in which to compute the weights for standardization as percentage in each of the levels of `var2`. `weights` A numeric vector of weights that sum to 1 and has length equal to the number of strata defined by `var2`. If omitted, weights are calculated using `data`. `...` not used

Details

Fit prodlim with two categorical covariates, say age and sex. Then standardize the absolute risk within each of the two gender to the age distribution in whole data set.

Author(s)

Thomas A. Gerds <[email protected]>

Examples

 ```1 2 3 4 5 6 7 8 9``` ```library(survival) library(prodlim) library(data.table) data(pbc) d <- na.omit(pbc[,c("time","status","trt","age","sex")]) d\$agegroup <- cut(d\$age,breaks=c(0,40,50,60,100)) fit <- prodlim(Hist(time,status==1)~trt+agegroup,data=d) standardize.prodlim(fit,var1="trt",var2="agegroup",data=d,times=1000) standardize.prodlim(fit,var1="trt",var2="agegroup",data=d,times=c(1000,1500)) ```

tagteam/heaven documentation built on June 21, 2019, 6:37 p.m.