data(data.simulation)
cp.hat <- case2.b.initial(y = DST$obs, tp= DST$tp, cp=DST$cp)
# visulize the parameter function and the estimated function
par(mfrow = c(1,2))
persp(DST$cp, DST$tp, exp(DST$pars$logvar), theta=60, phi=15,
ticktype = "detailed", col="lightblue",
xlab = "covariate", ylab = "time",
zlab="data", main="variance surface")
persp(DST$cp, DST$tp, cp.hat$var, theta=60, phi=15,
ticktype = "detailed", col="lightblue",
xlab = "covariate", ylab = "time",
zlab="data", main="initial estiamtes")
Run the code above in your browser using DataLab