# load data data(stan) # fit the model and evaluate stan.fit <- gssanova(cbind(time+.01,status)~age, data=stan,family="weibull",ext=1/(64-12)) uu <- seq(11,65,length=201) est <- predict(stan.fit,data.frame(age=uu),se=TRUE,include="age") # plot the fit const <- predict(stan.fit,stan,inc="1")[1] plot(stan$age,stan$time/exp(const),type="n", xlab="age at transplant", ylab=expression(e^{mu[u](u)}==e^{-eta[u]/alpha})) points(stan$age,stan$time/exp(const), pch=c("+","o")[stan$status+1],col=c(6,3)[stan$status+1]) lines(uu,exp(est$fit),col=4) lines(uu,exp(est$fit+1.96*est$se),col=5) lines(uu,exp(est$fit-1.96*est$se),col=5)