Skip to contents

The hierarchical half-t prior of Huang and Wand (2013) with df degrees of freedom, for prior = or prior_residual = in gibbs(). Each standard deviation is half-t with df degrees of freedom and scale A, flat at zero; each correlation of a covariance group has density proportional to (1 - r^2)^(df/2 - 1), uniform on (-1, 1) at df = 2, which is what prior = "half_t" gives. The prior is proper, and every full conditional stays conjugate. A is the automatic scale of gibbs() (sd(y) / r_k, described under prior there) times scale.

Usage

half_t(df = 2, scale = 1)

Arguments

df

degrees of freedom, a single positive number

scale

multiplier of the automatic scale: one positive number for every variance, or a named vector whose names are variances as samples of the fit names them (c("var(maternal)" = 0.5)), each multiplying the scale of that variance while the others keep 1. A multiplier and not an absolute A, so the prior follows the unit of the trait and the scale of a covariate. Under prior_residual it is a single number, the multiplier of sd(y)

Value

an object of class br_half_t, a list with df and scale

Details

With prior left unset, gibbs() uses half_t() on every scalar random term of a Gaussian trait (the covariance groups and the residual take "flat", and a group of d components with 2d + 2 levels or fewer takes half_t()), and half_t(df = 4) on every random term with family = "probit". prior = "half_t" or prior = half_t() named puts the prior on the covariance groups too, which removed the boundary trap of "jeffreys" in the validation but pulled a direct-maternal correlation of -0.8 toward zero (see prior in gibbs()), and gives the residual "uniform_sd" unless prior_residual says otherwise.

References

Huang, A. & Wand, M.P. (2013). Simple marginally noninformative prior distributions for covariance matrices. Bayesian Analysis 8:439-452.

Examples

half_t()
#> $df
#> [1] 2
#> 
#> $scale
#> [1] 1
#> 
#> attr(,"class")
#> [1] "br_half_t"
half_t(df = 4, scale = c("var(maternal)" = 0.5))
#> $df
#> [1] 4
#> 
#> $scale
#> var(maternal) 
#>           0.5 
#> 
#> attr(,"class")
#> [1] "br_half_t"