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)

Arguments

location

The mean of the distribution. If setting the priors for regression coefficients, this can be a single value, or multiple values, one per coefficient

scale

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

autoscale

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.

lower

The lower bound for the uniform distribution

upper

The upper bound for the uniform distribution

df

The number of degrees of freedom for the Student-t distribution

shape

The gamma distribution shape parameter

rate

The gamma distribution rate parameter (1/scale)

Value

A list containing prior settings used internally by ubms.

Examples

normal()
#> $dist
#> [1] 1
#> 
#> $par1
#> [1] 0
#> 
#> $par2
#> [1] 2.5
#> 
#> $par3
#> [1] 0
#> 
#> $autoscale
#> [1] TRUE
#>