This function checks the compatibility of submitted parameters for the prior distributions and sets missing values to default values.
check_prior( P_f, P_r, J, ordered =FALSE, eta = numeric(P_f), Psi = diag(P_f), delta =1, xi = numeric(P_r), D = diag(P_r), nu = P_r +2, Theta = diag(P_r), kappa =if(ordered)4else(J +1), E =if(ordered) diag(1)else diag(J -1), zeta = numeric(J -2), Z = diag(J -2))
Arguments
P_f: The number of covariates connected to a fixed coefficient (can be 0).
P_r: The number of covariates connected to a random coefficient (can be 0).
J: The number (greater or equal 2) of choice alternatives.
ordered: A boolean, FALSE per default. If TRUE, the choice set alternatives is assumed to be ordered from worst to best.
eta: The mean vector of length P_f of the normal prior for alpha. Per default, eta = numeric(P_f).
Psi: The covariance matrix of dimension P_f x P_f of the normal prior for alpha. Per default, Psi = diag(P_f).
delta: A numeric for the concentration parameter vector rep(delta,C) of the Dirichlet prior for s. Per default, delta = 1. In case of Dirichlet process-based updates of the latent classes, delta = 0.1 per default.
xi: The mean vector of length P_r of the normal prior for each b_c. Per default, xi = numeric(P_r).
D: The covariance matrix of dimension P_r x P_r of the normal prior for each b_c. Per default, D = diag(P_r).
nu: The degrees of freedom (a natural number greater than P_r) of the Inverse Wishart prior for each Omega_c. Per default, nu = P_r + 2.
Theta: The scale matrix of dimension P_r x P_r of the Inverse Wishart prior for each Omega_c. Per default, Theta = diag(P_r).
kappa: The degrees of freedom (a natural number greater than J-1) of the Inverse Wishart prior for Sigma. Per default, kappa = J + 1.
E: The scale matrix of dimension J-1 x J-1 of the Inverse Wishart prior for Sigma. Per default, E = diag(J - 1).
zeta: The mean vector of length J - 2 of the normal prior for the logarithmic increments d of the utility thresholds in the ordered probit model. Per default, zeta = numeric(J - 2).
Z: The covariance matrix of dimension J-2 x J-2 of the normal prior for the logarithmic increments d of the utility thresholds in the ordered probit model. Per default, Z = diag(J - 2).
Returns
An object of class RprobitB_prior, which is a list containing all prior parameters. Parameters that are not relevant for the model configuration are set to NA.
Details
A priori, we assume that the model parameters follow these distributions:
α∼N(η,Ψ)
s∼Dir(δ)
bc∼N(ξ,D) for all classes c
Ωc∼IW(ν,Θ) for all classes c
Σ∼IW(κ,E)
d∼N(ζ,Z)
where N denotes the normal, Dir the Dirichlet, and IW