additive.tvcure {tvcure}R Documentation

Extract additive term estimates from a tvcure object.

Description

Extract additive term estimates from a tvcure object.

Usage

additive.tvcure(obj.tvcure, ngrid = 300, ci.level = 0.95)

Arguments

obj.tvcure

a tvcure.object.

ngrid

number of gridpoints where the fitted additive terms are evaluated.

ci.level

confidence level for the pointwise credible intervals of the additive terms.

Value

A list with following elements:

The same definitions applies for nfixed2, J2, additive.lab2, K2, knots2, f2.grid, f2, f2.se with the additive terms in the short-term (or timing) submodel.

Author(s)

Philippe Lambert p.lambert@uliege.be

References

Lambert, P. and Kreyenfeld, M. (2025). Time-varying exogenous covariates with frequently changing values in double additive cure survival model: an application to fertility. Journal of the Royal Statistical Society, Series A. <doi:10.1093/jrsssa/qnaf035>

Examples


require(tvcure)
## Simulated data generation
beta = c(beta0=.4, beta1=-.2, beta2=.15) ; gam = c(gam1=.2, gam2=.2)
data = simulateTVcureData(n=500, seed=123, beta=beta, gam=gam,
                          RC.dist="exponential",mu.cens=550)$rawdata
## TVcure model fitting
tau.0 = 2.7 ; lambda1.0 = c(40,15) ; lambda2.0 = c(25,70) ## Optional
model = tvcure(~z1+z2+s(x1)+s(x2), ~z3+z4+s(x3)+s(x4), data=data,
               tau.0=tau.0, lambda1.0=lambda1.0, lambda2.0=lambda2.0)

## Extract additive term estimates from tvcure object
obj = additive.tvcure(model)
names(obj)



[Package tvcure version 0.6.6 Index]