## Not run:
# data(nwtco)
# nwtco <- nwtco[1:500,]
#
# #creating 2 imputed data sets (m=2) for speed, would normally create more
# ans <- gammaImpute(formula=Surv(edrel,rel)~histol + instit,
# data = nwtco, m=2, gamma.factor=1, DCO.time=6209)
#
# #subject specific gamma (multiplied by gamma.factor to give the jump)
# #NA for subjects that are not to be imputed
# jumps <- c(rep(NA,10),rep(1,490))
# DCO.values <- rep(6209,500)
#
# ans.2 <- gammaImpute(formula=Surv(edrel,rel)~histol + instit + strata(stage),
# data = nwtco, m=2, bootstrap.strata=strata(nwtco$stage),
# gamma=jumps, gamma.factor=1, DCO.time=DCO.values)
#
# #can also use column names
# nwtco$gamma <- jumps
# nwtco$DCO.time <- DCO.values
# ans.3 <- gammaImpute(formula=Surv(edrel,rel)~histol + instit + strata(stage),
# data = nwtco, m=2, bootstrap.strata=strata(nwtco$stage),
# gamma="gamma", DCO.time="DCO.time")
# ## End(Not run)
Run the code above in your browser using DataLab