Description Usage Arguments Details Value See Also Examples
A test function provide binomial data for testing Weierstrass rejection sampling (and comparing to the fullset posterior/averaging/weighted averaging combiners).
1 2 |
prob |
The parameter for binomial distribution. Default is 0.001. |
samp |
The posterior sample size on each subset. Default is 20000. |
n |
The total sample size. Default is 10000. |
m |
Number of subsets. Default is 20. |
accept |
The acceptance rate for the Weierstrass rejection sampling. Default is 0.2. |
draw |
Indicate whether the result should be plotted. |
The function generates data from a binomial distribution and make use of Weierstrass rejection sampler, weighted average and averge to combine the subset posterior samples.Both the weighted and unweighted weierstrass sampler will be used, and the results are saved for further processing.
A list containing several components.
posteriors: a list containing all subset posterior samples. Input for weierstrass rejection samping.
true.posterior: a matrix containing posterior samples drawn with full data set.
CombSample.weight: a matrix containing combined samples generated by the Weierstrass rejection sampler
CombSample.unweight: a matrix containing combined samples generated by the unweighted Weierstrass rejection sampler
weight.ave: a matrix containing combined samples via inverse-variance weighted averaging.
ave: a matrix containing combined samples via simple averaging.
weierstrass
for the details of weierstrass rejection sampling. logitTest
for another test on the logistic regression.
1 2 3 | ## Not run: BinTest()
## Not run: BinTest(prob = 0.49)
## Not run: BinTest(prob = 0.99)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.