
Last chance! 50% off unlimited learning
Sale ends in
Resampling is used for computing p-values for tests of time-varying effects.
The modelling formula uses the standard survival modelling given in the survival package.
aalen(formula,data=sys.parent(),start.time=0,max.time=NULL,robust=1,
id=NULL,clusters=NULL,residuals=0,n.sim=1000,weighted.test=0,
covariance=0,resample.iid=0,deltaweight=1,silent=1,weights=NULL,
max.clust=1000, gamma=NULL, offsets=0)
data(sTRACE)
# Fits Aalen model
out<-aalen(Surv(time,status==9)~age+sex+diabetes+chf+vf,
sTRACE,max.time=7,n.sim=100)
summary(out)
par(mfrow=c(2,3))
plot(out)
# Fits semi-parametric additive hazards model
out<-aalen(Surv(time,status==9)~const(age)+const(sex)+const(diabetes)+chf+vf,
sTRACE,max.time=7,n.sim=100)
summary(out)
par(mfrow=c(2,3))
plot(out)
## Excess risk additive modelling
data(mela.pop)
dummy<-rnorm(nrow(mela.pop));
# Fits Aalen model with offsets
out<-aalen(Surv(start,stop,status==1)~age+sex+const(dummy),
mela.pop,max.time=7,n.sim=100,offsets=mela.pop$rate,id=mela.pop$id,
gamma=0)
summary(out)
par(mfrow=c(2,3))
plot(out,main="Additive excess riks model")
# Fits semi-parametric additive hazards model with offsets
out<-aalen(Surv(start,stop,status==1)~age+const(sex),
mela.pop,max.time=7,n.sim=100,offsets=mela.pop$rate,id=mela.pop$id)
summary(out)
plot(out,main="Additive excess riks model")
Run the code above in your browser using DataLab