update.elrm: Update Method for Objects of Class elrm.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

An update method for objects created by elrm(). Extends the Markov chain of an elrm object by a specified number of iterations.

Usage

1
2
## S3 method for class 'elrm'
update(object, iter, burnIn = 0, alpha = 0.05, ...)

Arguments

object

an object of class elrm, resulting from a call to elrm() or a previous call to update().

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).

Details

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.

Value

An object of class elrm.

Author(s)

David Zamar, Jinko Graham, Brad McNeney

References

Zamar, D., McNeney, B., & Graham, J. (2007). elrm: Software Implementing Exact-Like Inference for Logistic Regression Models. Journal of Statistical Software, 21(3), 1-18.

Zamar, D., Monte Carlo Markov Chain Exact Inference for Binomial Regression Models. Master's thesis, Statistics and Actuarial Sciences, Simon Fraser University, 2006

Forster, J.J., McDonald, J.W. & Smith, P.W.F. Markov chain Monte Carlo exact inference for binomial and multinomial logistic regression models. Statistics and Computing 13, 169-177 (2003).

Geyer, C.J. Practical Markov chain Monte Carlo. Statistical Science, 7:473-511, 1992

See Also

summary.elrm, plot.elrm, elrm.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Drug dataset example with sex and treatment as the variables of interest
data(drugDat);
drug.elrm = elrm(formula=recovered/n~sex+treatment, interest=~treatment, r=4, 
	iter=2000, 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=3000, 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);

elrm documentation built on Oct. 26, 2021, 9:07 a.m.