print.predMexhaz: Print method for a predMexhaz object

View source: R/print.predMexhaz.R

print.predMexhazR Documentation

Print method for a predMexhaz object

Description

Display the first lines of the data.frame containing the predictions provided by the predMexhaz function.

Usage

## S3 method for class 'predMexhaz'
print(x, ...)

Arguments

x

an object of class predMexhaz.

...

represents additional parameters directly passed to print.

See Also

predict.mexhaz

Examples


data(simdatn1)

## Fit of a fixed-effect hazard model, with the baseline hazard
## described by a linear B-spline with two knots at 1 and 5 year and with
## effects of age (agecr), deprivation index (depindex) and sex (IsexH)

Mod_bs1_2 <- mexhaz(formula=Surv(time=timesurv,
event=vstat)~agecr+depindex+IsexH, data=simdatn1, base="exp.bs",
degree=1, knots=c(1,5), verbose=0)

## Prediction at several time points for one vector of covariates
Pred_Modbs1_2A <- predict(Mod_bs1_2, time.pts=seq(0.1,10,by=0.1),
data.val=data.frame(agecr=0,depindex=0.5,IsexH=1), conf.int="delta")

print(Pred_Modbs1_2A)

mexhaz documentation built on Oct. 31, 2022, 5:08 p.m.