Learn R Programming

riskRegression (version 1.3.7)

seRobustCox: Computation of standard errors for predictions

Description

Compute the standard error associated to the predictions from Cox regression model using the functional delta method.

Usage

seRobustCox(nTimes, type, Lambda0, iid, object.n, nStrata, new.eXb, new.LPdata,
  new.strata, new.survival, export)

Arguments

nTimes

the number of time points at which to evaluate the standard errors of the predictions.

type

One or several strings that match (either in lower or upper case or mixtures) one or several of the strings "hazard","cumhazard", "survival".

Lambda0

the baseline hazard estimate returned by BaseHazStrata_cpp.

iid

the value of the influence function returned by iidCox.

object.n

the number of observations in the dataset used to estimate the object.

nStrata

the number of strata.

new.eXb

the linear predictor evaluated for the new observations

new.LPdata

the variables involved in the linear predictor for the new observations

new.strata

the strata indicator for the new observations

new.survival

the survival evaluated for the new observations

export

can be "iid" to return the value of the influence function for each observation "se" to return the standard error for a given timepoint

object

The fitted Cox regression model object either obtained with coxph (survival package) or cph (rms package).

Value

A list optionally containing the standard error for the survival, cumulative hazard and hazard.