update.elrm {elrm} | R Documentation |
An update method for objects created by elrm()
. Extends the Markov chain of an elrm
object by a specified number of iterations.
## S3 method for class 'elrm' update(object, iter, burnIn = 0, alpha = 0.05, ...)
object |
an object of class |
iter |
an integer representing the number of Markov chain iterations to make. |
burnIn |
the burn-in period to use when conducting inference. Values of the Markov chain in the burn-in period are discarded; default=0. |
alpha |
determines the level used for confidence intervals; default=0.05. |
... |
additional arguments to the update function (currently unused). |
Extends the Markov chain of an elrm
object by creating a new Markov chain of the specified length using the last sampled value as the starting point. The newly created chain is then appended to the original. Subsequent inference is based on the extended Markov chain.
An object of class elrm
.
David Zamar, Jinko Graham, Brad McNeney
Zamar David. Monte Carlo Markov Chain Exact Inference for Binomial Regression Models. Master's thesis, Statistics and Actuarial Sciences, Simon Fraser University, 2006.
Zamar D, McNeney B and Graham J. elrm: Software Implementing Exact-like Inference for Logistic Regression Models. Journal of Statistical Software 2007, 21(3).
summary.elrm
, plot.elrm
, elrm
.
# Drug dataset example with sex and treatment as the variables of interest data(drugDat); drug.elrm = elrm(formula=recovered/n~sex+treatment, interest=~sex+treatment, r=4, iter=10000, burnIn=0, dataset=drugDat); # Summarize the results summary(drug.elrm); # Call update and extend the chain by 15000 iterations and set the burn-in # period to 100 iterations drug.elrm = update(drug.elrm, iter=15000, burnIn=100); # Summarize the results summary(drug.elrm); # Now change the burn-in to 500 drug.elrm = update(drug.elrm, iter=0, burnIn=500); # Summarize the results summary(drug.elrm);