Description Usage Arguments Details Value Note
View source: R/simulateposterior.R
Draws a sample from a posterior distribution.
1 2 3 4 | SimulatePosterior(obj, n.sims = 1e+05, ...)
## S3 method for class 'TBRAnalysisFitTbr1'
SimulatePosterior(obj, n.sims = 1e+05, ...)
|
obj |
an object. |
n.sims |
(integer >= 2) number of simulations to draw. |
... |
other arguments passed on to the methods. |
SimulatePosterior.TBRAnalysisFitTbr1
: Draws from the
posterior distribution of the pointwise incremental effect over the test
period.
A PosteriorSimulations object, which is a matrix with 'n.sims' columns and as many rows as there are time points in the test period. Each row corresponds to one time point in the test period, with the draws from the pointwise distribution of the incremental effect.
The 'standard' noninformative prior is assumed: uniform on (beta, log
sigma). Reference: Gelman et al. Bayesian Data Analysis (2nd ed.),
section 14.2, formula (14.8). To obtain the simulations for the
cumulative distribution, use the cumsum
method.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.