describePriors: Text decription of priors

View source: R/query-functions.R

describePriorsR Documentation

Text decription of priors

Description

Generate data.frames giving, for each main effect or interaction in a model, a short description of the associated prior. The data.frames are useful for understanding a model, or for generating tables in documents describing the analyses.

Usage

describePriors(filename)

Arguments

filename

The filename used by the estimate function.

Details

describePriors is applied to the databases created by functions estimateModel, estimateCounts or estimateAccount.

Value

If filename refers to the results from a call to estimateModel, then describePriors returns a single data.frame. Otherwise, it returns a named list containing one or more data.frames.

See Also

showModel gives a semi-algebraic description of an entire model, including the priors.

Examples

deaths <- demdata::VADeaths2
popn <- demdata::VAPopn
deaths <- round(deaths)
deaths <- Counts(deaths)
popn <- Counts(popn)
filename <- tempfile()
estimateModel(Model(y ~ Poisson(mean ~ age * sex)),
              y = deaths,
              exposure = popn,
              filename = filename,
              nBurnin = 0,
              nSim = 5,
              nChain = 2)
describePriors(filename)

StatisticsNZ/demest documentation built on Nov. 2, 2023, 7:56 p.m.