G_est {truncAIPW}R Documentation

Estimate the Conditional CDF for the Left Truncation Time given Covariates

Description

Estimate the conditional cumulative distribution function (CDF) of the left truncation time given covariates evaluated at given time points. The options implemented in this function are: Cox proportional hazards regression using function coxph() from R package ‘survival’, and the hazard model with penalized splines using function survPen() from R package ‘survPen’.

Usage

G_est(
  dat.fit,
  dat.est = dat.fit,
  time.eval,
  model,
  time.name,
  Q.name,
  event.name,
  cov.names,
  trim = 0,
  weights = rep(1, nrow(dat.fit)),
  formula.survPen = NA
)

Arguments

dat.fit

data frame that is used to fit the model for the full data conditional distribution of the event time given the covariates.

dat.est

data frame that contains the subjects for which the estimated conditional CDF is computed.

time.eval

vector of time points at which the conditional CDF is evaluated.

model

method used to estimate the conditional CDF. The options available are "Cox" and "spline", corresponding to Cox proportional hazards regression using function coxph() from R package ‘survival’, and the hazard model with penalized splines using function survPen() from R package ‘survPen’, respectively.

time.name

name of the event time variable.

Q.name

name of the left truncation time variable.

event.name

name of the event indicator.

cov.names

vector of the names of covariates.

trim

constant for bounding the estimated conditional CDF from 0.

weights

vector of case weights.

formula.survPen

the formula when applying the hazard model with penalized splines implemented in survPen::survPen.

Value

G_est() returns a matrix of the estimated conditional CDF for subjects in 'data.est' evaluated at the time points in the vector 'time.eval'. Each row corresponds to a subject and each column corresponds to a time point. The column names of the matrix are the times in 'time.eval'.

See Also

F_est

Examples

data("simu")
v = c(0.5, 1, 1.5, 2, 2.5, 3)
Gvz.mx = G_est(simu, simu[1:10,], v, "Cox", "time", "Q", "delta", c("Z1","Z2"))

[Package truncAIPW version 1.0.1 Index]