addHazardPureRisk {WeightCalibSurvival}R Documentation

Additive Hazards Pure Risk

Description

A pure risk is estimated from additive hazards model fit for a given vector of covariates. Its variance estimate (standard error) is also computed based on influence functions of model coefficients.

Usage

addHazardPureRisk(addHazObj, newdata, risk.time,
                  new.risk.col="pureRisk", new.risk.se.col="pureRisk.SE") 

Arguments

addHazObj

A fitted model from addHazard.

newdata

Data frame for covariate-specific pure risk estimation.

risk.time

Projection time for pure risk.

new.risk.col

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

new.risk.se.col

New column name added to newdata containing the estimated standard errors for pure risk. The default is "pureRisk.SE".

Details

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

Value

The data frame newdata with two additional columns containing the estimated pure risk and corresponding standard error.

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

addHazard

Examples


  data(sample_data, package="WeightCalibSurvival")

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

  fit <- addHazard(sample_data, ncc.subset, outcome.var, time.vars, timeDep.covars, timeIndep.covars, 
            anc.covars, risk.time, inclProb.var=inclProb.var, nrisk.var=nrisk.var)

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

[Package WeightCalibSurvival version 1.0.0 Index]