Learn R Programming

CoxRidge (version 0.9.2)

comp.graph: Plot a cox.ridge or cox.dynamic.ridge object.

Description

Plots time varying effects of covariates.

Usage

comp.graph(obj, alpha = 0.05, xlab = "time", ylab = "X effect", all.terms = TRUE, variable)

Arguments

obj
A cox.ridge or cox.dynamic.ridge object.
alpha
The alpha level used for confidence bands.
xlab
a title for the x axis
ylab
a title for the y axis
all.terms
When TRUE all time-varying effects variables are plotted.
variable
when all.terms=FALSE you need to specify which variable to be plotted. Use numbers 1,2,3... for first, second, third etc.

Details

Confidence bands are computed using the delta method.

References

Perperoglou A, le Cessie S, van Houwelingen HC (2006). Reduced-rank hazard regression for modelling non-proportional hazards. Statistics in Medicine: 25, 2831-2845

See Also

plot

Examples

Run this code
data(ova)
attach(ova)
X <- cbind(karn,diam,figo)
X <- apply(X,2,function(x){(x-mean(x))/sqrt(var(x))})
Ft <- cbind(rep(1,nrow(X)),bs(time))
fit <- Dynamic.Ridge(time,death,X,Ft=Ft,fun="simple")
comp.graph(fit,all.terms=FALSE,variable=1)
par(mfrow=c(3,1))
comp.graph(fit)

Run the code above in your browser using DataLab