coxtv
or coxtp
object using a Wald test statisticR/tvef.ph.R
tvef.zero.time.Rd
Testing the significance of the covariates at each time point.
tvef.zero.time(fit, time, parm)
fitted coxtv
or coxtp
model.
the time points to test if the covariate is significant or not.
the names of parameters to be tested.
tvef.zero.time
produces a list of length nvars
. Each element of the list is a matrix with respect to a
covariate. The matrix is of dimension len_unique_t
by 4, where len_unique_t
is the length of unique observed event time.
Each row corresponds to the testing result at that time. The four
columns give the estimations, standard error, test-statistic and P-value.
data(ExampleData)
z <- ExampleData$z
time <- ExampleData$time
event <- ExampleData$event
fit <- coxtv(event = event, z = z, time = time)
#> Iter 1: Obj fun = -3.2982771; Stopping crit = 1.0000000e+00;
#> Iter 2: Obj fun = -3.2916285; Stopping crit = 2.1424865e-02;
#> Iter 3: Obj fun = -3.2916034; Stopping crit = 8.0884492e-05;
#> Iter 4: Obj fun = -3.2916034; Stopping crit = 1.8232153e-09;
#> Algorithm converged after 4 iterations!
test <- tvef.zero.time(fit)