coxHazardPureRisk {WeightCalibSurvival}R Documentation

Cox Proportional Hazards Pure Risk

Description

Estimate pure risk from Cox proportional hazards model given a set of covariates.

Usage

coxHazardPureRisk(coxHazObj, newdata, risk.time, risk.time0=0, 
                  new.risk.col="pureRisk") 

Arguments

coxHazObj

A fitted model from addHazard.

newdata

Data frame for covariate-specific pure risk estimation.

risk.time

Projection time for pure risk.

risk.time0

Initial projection time for pure risk. The default is 0.

new.risk.col

New column name added to newdata containing the estimates for pure risk. The default is "pureRisk".

Details

The covariates used in coxHazObj must also be in newdata, and they must be of the same type.

Value

The data frame newdata with one additional column containing the estimated pure risk.

Author(s)

Yei Eun Shin syeeun@gmail.com

References

Shin YE, Pfeiffer RM Graubard BI, Gail MH. Weight calibration to improve efficiency for estimating pure risks from the additive hazards model with the nested case-control design. Biometrics. 2020;1-13. https://doi.org/10.1111/biom.13413

See Also

coxHazard

Examples


  data(sample_data, package="WeightCalibSurvival")

  # Set the input arguments
  ncc.subset       <- sample_data[, "ind.ph2"] 
  outcome.var      <- "ind.fail"
  time.vars        <- "eventime"
  covars           <- c("X1", "X2", "Z1", "Z2")
  anc.covars       <- "U"
  risk.time        <- 8
  inclProb.var     <- "incl.prob"

  fit <- coxHazard(sample_data, ncc.subset, outcome.var, time.vars, covars, 
            anc.covars, risk.time, inclProb.var=inclProb.var)

  newdata <- sample_data[ncc.subset, ]
  ret     <- coxHazardPureRisk(fit$with.calibration, newdata, risk.time)
  ret[1:5, ]

[Package WeightCalibSurvival version 1.0.0 Index]