Specify prior distributions and associated parameters for use in
ubms
models.
normal(location = 0, scale = 2.5, autoscale = TRUE)
uniform(lower = -5, upper = 5)
student_t(df = 1, location = 0, scale = 2.5, autoscale = TRUE)
logistic(location = 0, scale = 1)
cauchy(location = 0, scale = 2.5, autoscale = TRUE)
gamma(shape = 1, rate = 1)
laplace(location = 0, scale = 2.5, autoscale = TRUE)
The mean of the distribution. If setting the priors for regression coefficients, this can be a single value, or multiple values, one per coefficient
The standard deviation of the distribution. If setting the priors for regression coefficients, this can be a single value, or multiple values, one per coefficient
If TRUE
, ubms will automatically adjust priors
for each regression coefficient relative to its corresponding covariate x.
Specifically, the prior for a given coefficient will be divided by
sd(x). This helps account for covariates with very different magnitudes
in the same model. If your data are already standardized (e.g. with use of
scale()
), this will have minimal effect as sd(x) will be
approximately 1. Standardizing your covariates is highly recommended.
The lower bound for the uniform distribution
The upper bound for the uniform distribution
The number of degrees of freedom for the Student-t distribution
The gamma distribution shape parameter
The gamma distribution rate parameter (1/scale)
A list
containing prior settings used internally by ubms
.
normal()
#> $dist
#> [1] 1
#>
#> $par1
#> [1] 0
#>
#> $par2
#> [1] 2.5
#>
#> $par3
#> [1] 0
#>
#> $autoscale
#> [1] TRUE
#>