points.predMexhaz: Points method for a predMexhaz object

Description Usage Arguments See Also Examples

Description

Function for adding to an already existing graphical window the predicted (excess) hazard or (net) survival based on a predMexhaz object.

Usage

1
2
## S3 method for class 'predMexhaz'
points(x,which=c("surv","hazard"),conf.int=TRUE, ...)

Arguments

x

an object of class predMexhaz, corresponding to (excess) hazard and (net) survival predictions based on a survival model fitted with the mexhaz function. Predictions can be obtained for multiple times for one vector of covariates ("multitime") or for several vectors of covariates at one time point ("multiobs"). The points() function only applies to the "multitime" type of predictions.

which

the type of curve to be plotted. Selection can be made between "surv" (default value) for the (net) survival curve and "hazard" for the (excess) hazard.

conf.int

logical values allowing the user to decide whether to plot the 95% confidence limits of the survival (or hazard), if confidence limits are available in the predMexhaz object.

...

additional parameters that are directly passed to the points function.

See Also

predMexhaz, plot.predMexhaz

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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 <- predMexhaz(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")

plot(Pred_Modbs1_2A,which="hazard",col="red")
points(Pred_Modbs1_2A,which="hazard",conf.int=FALSE)


Search within the mexhaz package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.