# 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')
#
# fit.lung.prune = estimateMRH(formula = Surv(time, censorvar) ~
# age + as.factor(sex) + ph.karno, data = cancer,
# M = 3, maxStudyTime = 960, burnIn = 200, maxIter = 1000,
# thin = 1, prune = TRUE, outfolder = 'MRH_lung_prune')## End(Not run)
# Compare the DIC of the pruned and unpruned models.
# The sample size must be entered for calculation of BIC.
# This number can be found in the ``MCMCInfo.txt" file
# in the output folder.
## Not run:
# DIC(fit.lung, n = 227)
# DIC(fit.lung.prune, n = 227)## End(Not run)
Run the code above in your browser using DataLab