$$E( Z_{ij} | X_{ij}(t) ) = \beta^T(t) X_{ij}^1(t) + \gamma^T X_{ij}^2(t)$$ where $Z_{ij}$ is the j'th measurement at time t for the i'th subject with covariates $X_{ij}^1$ and $X_{ij}^2$. Resampling is used for computing p-values for tests of timevarying effects.
dynreg(formula,data=sys.parent(),aalenmod,bandwidth=0.5,id=NULL,
bhat=NULL,start.time=0,max.time=NULL,n.sim=500,
meansub=1,weighted.test=0,resample=0)
This is also an efficient estimator when the initial estimator is consistent for $\beta(t)$ and then asymptotically equivalent to cum, but small sample properties appear inferior. Its variance is estimated by var.cum.
To plot this estimate use type="ms.mpp" in the plot() command.
data(csl)
indi.m<-rep(1,length(csl$lt))
# Fits time-varying regression model
out<-dynreg(prot~treat+prot.prev+sex+age,data=csl,
Surv(lt,rt,indi.m)~+1,start.time=0,max.time=2,id=csl$id,
n.sim=100,bandwidth=0.7,meansub=0)
summary(out)
par(mfrow=c(2,3))
plot(out)
# Fits time-varying semi-parametric regression model.
outS<-dynreg(prot~treat+const(prot.prev)+const(sex)+const(age),data=csl,
Surv(lt,rt,indi.m)~+1,start.time=0,max.time=2,id=csl$id,
n.sim=100,bandwidth=0.7,meansub=0)
summary(outS)
Run the code above in your browser using DataLab