SimulatePosterior: Draws a sample from a posterior distribution.

Description Usage Arguments Details Value Note

View source: R/simulateposterior.R

Description

Draws a sample from a posterior distribution.

Usage

1
2
3
4
SimulatePosterior(obj, n.sims = 1e+05, ...)

## S3 method for class 'TBRAnalysisFitTbr1'
SimulatePosterior(obj, n.sims = 1e+05, ...)

Arguments

obj

an object.

n.sims

(integer >= 2) number of simulations to draw.

...

other arguments passed on to the methods.

Details

SimulatePosterior.TBRAnalysisFitTbr1: Draws from the posterior distribution of the pointwise incremental effect over the test period.

Value

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.

Note

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.


google/GeoexperimentsResearch documentation built on May 17, 2019, 7:42 a.m.