It can be used to specify either a prior distribution for a model parameter or a likelihood function for an observation model.

Student(mu = NULL, sigma = NULL, nu = NULL, ordered = NULL,
  equal = NULL, bounds = list(NULL, NULL), trunc = list(NULL, NULL),
  k = NULL, r = NULL, param = NULL)

Arguments

mu

Either a fixed value or a prior density for the location parameter.

sigma

Either a fixed value or a prior density for the shape parameter.

nu

Either a fixed value or a prior density for the degree-of-freedom parameter.

ordered

(optional) A logical setting an increasing ordering constraint on any univariate parameter and any unconstrained parameter vector. Ordered simplices (e.g. Categorical, Multinomial, Dirichlet) are currently not implemented. Most useful for location parameters to break symmetries and fix label switching as shown in Betancourt (2017). It defaults to unordered parameters.

equal

(optional) A logical setting whether the parameter takes the same value in every hidden state, i.e. the parameter is shared across states. It defaults to unequal parameters.

bounds

(optional) A list with two elements specifying the lower and upper bound for the parameter space. Use either a fixed value for a finite bound or NULL for no bounds. It defaults to an unbounded parameter space.

trunc

(optional) A list with two elements specifying the lower and upper bound for the domain of the density function. Use either a fixed value for a finite bound or NULL for no truncation. It defaults to an unbounded domain.

k

(optional) The number of the hidden state for which this density should be used. This argument is mostly for internal use: you should not use it unless you are acquainted with the internals of this software.

r

(optional) The dimension of the observation vector dimension for which this density should be used. This argument is mostly for internal use: you should not use it unless you are acquainted with the internals of this software.

param

(optional) The name of the parameter. This argument is mostly for internal use: you should not use it unless you are acquainted with the internals of this software.

Value

A Density object.

References

Betancourt, Michael (2017) Identifying Bayesian Mixture Models Stan Case Studies Volume 4. Link.

See also

Examples

# With fixed values for the parameters Student(0, 1, 1)
#> Variable Density: Student (-infty, infty) #> Fixed parameters: 3 (mu = 0, sigma = 1, nu = 1)
# With priors for the parameters Student( mu = 0, sigma = Cauchy(mu = 0, sigma = 10, bounds = list(0, NULL)), nu = GammaDensity(2, 0.1) )
#> Variable Density: Student (-infty, infty) #> Free parameters: 2 (sigma, nu) #> sigma : #> Variable Density: Cauchy [0, infty) #> Fixed parameters: 2 (mu = 0, sigma = 10), #> nu : #> Variable Density: GammaDensity (-infty, infty) #> Fixed parameters: 2 (alpha = 2, beta = 0.1) #> Fixed parameters: 1 (mu = 0)