HalfT: Specify a half-t distribution.

View source: R/SpecPrior-generators.R

HalfTR Documentation

Specify a half-t distribution.

Description

If x has a t distribution, then abs(x) has a half-t distribution, also known as a folder t distribution. In package demest, most standard deviation or scale parameters have half-t priors.

Usage

HalfT(df = 7, scale = NULL, max = NULL, mult = 1)

Arguments

df

Degrees of freedom of the half-t distribution. A positive number, defaulting to 7

scale

Scale parameter for the half-t distribution. A positive number.

max

A positive number. If finite, the half-t distribution is truncated at this point.

mult

Multiplier applied to scale if scale is generated automatically. Defaults to 1.

Details

A half-t distribution with degrees of freedom n and scale A has density

p(y) \propto ((y^2)/n + A^2)^(-(n+1)/2).

Setting a maximum value that the standard deviation or scale parameter can take (and so specifying a truncated half-t distribution) can reduce numerical problems, and dramatically improve convergence. By default, the maximum value is set to the 0.999 quantile.Users can specify alternative values, including infinity.

HalfT is typically used to specify the prior for a main effect or interaction. In this case, if a value for scale is not specified, a default value is determined when function estimateModel, estimateCounts, or estimateAccount is called. Let s be the standard deviation of data y, or of log(y) in the case of a Poisson model without exposure. Let d be the degree of an interaction: for instance, an interaction between age and sex has degree 2, and an interaction between age, sex, and region has degree 3. Let m be the mult argument. The default value for scale is then

Model Term Default
Poisson with exposure Main effect m
Poisson with exposure Interaction of degree d m 0.5^{d-1}
Poisson without exposure Main effect \ ms
Poisson without exposure Interaction of degree d ms 0.5^{d-1}
binomial Main effect m
binomial Interaction of degree d m 0.5^{d-1}
normal Main effect ms
normal Interaction of degree d ms 0.5^{d-1}.

Value

Object of class HalfT.

References

Brazauskas, V., and Kleefeld, A. (2011) Folded and log-folded-t distributions as models for insurance loss data. Scandinavian Actuarial Journal 59-74.

Gelman, A. (2006). Prior distributions for variance parameters in hierarchical models (comment on article by Browne and Draper). Bayesian Analysis 1, 515-534.

Gelman, A., Carlin, J.B., Stern, H.S. and Rubin, D.B., 2014. Bayesian Ddata Analysis. Third Edition. Boca Raton, FL, USA: Chapman & Hall/CRC. Section 16.3.

See Also

Error, Exch, Exch

Examples

HalfT()
HalfT(scale = 0.5)
HalfT(df = 1, scale = 10)
HalfT(scale = 0.5, max = 4)
HalfT(mult = 0.5)
HalfT(mult = 2)

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