PLAC: Calculate the PLAC estimator when a time-dependent indicator...

View source: R/comp.est.R

PLACR Documentation

Calculate the PLAC estimator when a time-dependent indicator presents

Description

Both a conditional approach Cox model and a pairwise likelihood augmented estimator are fitted and the corresponding results are returned in a list.

Usage

PLAC(
  ltrc.formula,
  ltrc.data,
  id.var = "ID",
  td.type = "none",
  td.var = NULL,
  t.jump = NULL,
  init.val = NULL,
  max.iter = 100,
  print.result = TRUE,
  ...
)

Arguments

ltrc.formula

a formula of of the form Surv(A, Y, D) ~ Z, where Z only include the time-invariate covariates.

ltrc.data

a data.frame of the LTRC dataset including the responses, time-invariate covariates and the jump times for the time-depnencent covariate.

id.var

the name of the subject id in data.

td.type

the type of the time-dependent covariate. Either one of c("none", "independent", "post-trunc", "pre-post-trunc"). See Details.

td.var

the name of the time-dependent covariate in the output.

t.jump

the name of the jump time variable in data.

init.val

a list of the initial values of the coefficients and the baseline hazard function for the PLAC estimator.

max.iter

the maximal number of iteration for the PLAC estimator

print.result

logical, if a brief summary of the regression coefficient estiamtes should be printed out.

...

other arguments

Details

ltrc.formula should have the same form as used in coxph(); e.g., Surv(A, Y, D) ~ Z1 + Z2. where (A, Y, D) are the truncation time, the survival time and the status indicator ((tstart, tstop, event) as in coxph). td.type is used to determine which C++ function will be invoked: either PLAC_TI (if td.type = "none"), PLAC_TD (if td.type = "independent") or PLAC_TDR) (if td.type %in% c("post-trunc", "pre-post-trunc")). For td.type = "post-trunc", the pre-truncation values for the time-dependent covariate will be set to be zero for all subjects.

Value

a list of model fitting results for both conditional approach and the PLAC estimators.

Event.Time

Ordered distinct observed event times

b

Regression coefficients estiamtes

se.b

Model-based SEs of the regression coefficients estiamtes

H0

Estimated cumulative baseline hazard function

se.H0

Model-based SEs of the estimated cumulative baseline hazard function

sandwich

The sandwich estimator for (beta, lambda)

k

The number of iteration for used for the PLAC estimator

summ

A brief summary of the covariates effects

References

Wu, F., Kim, S., Qin, J., Saran, R., & Li, Y. (2018). A pairwise likelihood augmented Cox estimator for left‐truncated data. Biometrics, 74(1), 100-108.

Examples

# When only time-invariant covariates are involved
dat1 = sim.ltrc(n = 40)$dat
PLAC(ltrc.formula = Surv(As, Ys, Ds) ~ Z1 + Z2,
     ltrc.data = dat1, td.type = "none")
# When there is a time-dependent covariate that is independent of the truncation time
dat2 = sim.ltrc(n = 40, time.dep = TRUE,
               distr.A = "binomial", p.A = 0.8, Cmax = 5)$dat
PLAC(ltrc.formula = Surv(As, Ys, Ds) ~ Z,
     ltrc.data = dat2, td.type = "independent",
     td.var = "Zv", t.jump = "zeta")
# When there is a time-dependent covariate that depends on the truncation time
dat3 = sim.ltrc(n = 40, time.dep = TRUE, Zv.depA = TRUE, Cmax = 5)$dat
PLAC(ltrc.formula = Surv(As, Ys, Ds) ~ Z,
     ltrc.data = dat3, td.type = "post-trunc",
     td.var = "Zv", t.jump = "zeta")


942kid/plac documentation built on July 20, 2023, 2:43 a.m.