G_est | R Documentation |
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’.
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
)
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 |
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 |
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
'.
F_est
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.