Description Usage Arguments Value Author(s) References Examples
A function that generates macro-estimates with their uncertainty (standard error).
1 2 3 | DS.macro.inf(DS.GF.obj, num.modes = 1,
method = c("mean", "mode"),
iters = 25, exposure = NULL)
|
DS.GF.obj |
Object from |
num.modes |
The number of modes indicated by |
method |
Returns mean or mode(s) (based on user choice) along with the associated standard error(s). |
iters |
Integer value of total number of iterations. |
exposure |
In the case where |
DS.GF.macro.obj |
Object of class |
model.modes |
For |
mode.sd |
For |
boot.modes |
For |
model.mean |
For |
mean.sd |
For |
boot.mean |
For |
prior.fit |
Fitted values of estimated prior imported from the |
Doug Fletcher, Subhadeep Mukhopadhyay
Mukhopadhyay, S. and Fletcher, D., 2018. "Generalized Empirical Bayes via Frequentist Goodness of Fit," Nature Scientific Reports, 8(1), p.9983, https://www.nature.com/articles/s41598-018-28130-5.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
### MacroInference: Mode
data(rat)
rat.start <- gMLE.bb(rat$y, rat$n)$estimate
rat.ds <- DS.prior(rat, max.m = 4, rat.start. family = "Binomial")
rat.ds.macro <- DS.macro.inf(rat.ds, num.modes = 2, method = "mode", iters = 5)
rat.ds.macro
plot(rat.ds.macro)
### MacroInference: Mean
data(ulcer)
ulcer.start <- gMLE.nn(ulcer$y, ulcer$se)$estimate
ulcer.ds <- DS.prior(ulcer, max.m = 4, ulcer.start)
ulcer.ds.macro <- DS.macro.inf(ulcer.ds, num.modes = 1, method = "mean", iters = 5)
ulcer.ds.macro
plot(ulcer.ds.macro)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.