# These MRH fit portion of the examples are from the
# estimateMRH() help page.
# They do not need to be re-run if the objects
# are already in the active workspace.
data(cancer)
cancer$censorvar = cancer$status - 1
## Not run:
# fit.lung = estimateMRH(formula = Surv(time, censorvar) ~
# age + as.factor(sex) + ph.karno, data = cancer,
# M = 3, maxStudyTime = 960, burnIn = 200, maxIter = 1000,
# thin = 1, outfolder = 'MRH_lung')## End(Not run)
data(tongue)
## Not run:
# fit.tongue = estimateMRH(formula = Surv(time, delta) ~
# nph(type), data = tongue, M = 4,
# burnIn = 200, maxIter = 2000, thin = 1, outfolder = 'MRH_tongue_nph')## End(Not run)
# Summarize the models
## Not run:
# summary(fit.lung)
# summary(fit.lung, alpha.level = .01)
#
# # Read in from the saved output file, converting to an MRH object,
# # then summarize.
# mcmc.lung = as.MRH(read.table('MRH_lung/MCMCchains.txt', header = TRUE))
# summary(mcmc.lung, maxStudyTime = 960)
# summary(mcmc.lung, maxStudyTime = 960, alpha.level = .01)
# ## End(Not run)
Run the code above in your browser using DataLab