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,
mu_alpha_0 = numeric(P_f),
Sigma_alpha_0 = 10 * diag(P_f),
delta = 1,
mu_b_0 = numeric(P_r),
Sigma_b_0 = 10 * diag(P_r),
n_Omega_0 = P_r + 2,
V_Omega_0 = diag(P_r),
n_Sigma_0 = J + 1,
V_Sigma_0 = diag(J - 1),
mu_d_0 = numeric(J - 2),
Sigma_d_0 = diag(J - 2)
)An object of class RprobitB_prior, which is a list containing all
prior parameters.
[integer(1)]
The number of covariates connected to a fixed coefficient.
[integer(2)]
The number of covariates connected to a random coefficient.
[integer(1)]
The number >= 2 of choice alternatives.
[logical(1)]
If TRUE, the choice set alternatives is assumed to be ordered
from worst to best.
[numeric(P_f)]
The mean vector of the normal prior for alpha.
[matrix(P_f, P_f)]
The covariance matrix of the normal prior for alpha.
[numeric(1)]
The prior concentration for s.
[numeric(P_r)]
The mean vector of the normal prior for each b_c.
[matrix(P_r, P_r)]
The covariance matrix of the normal prior for each b_c.
[integer(1)]
The degrees of freedom of the Inverse Wishart prior for each Omega_c.
[matrix(P_r, P_r)]
The scale matrix of the Inverse Wishart prior for each Omega_c.
[integer(1)]
The degrees of freedom of the Inverse Wishart prior for Sigma.
[matrix(J - 1, J - 1)]
The scale matrix of the Inverse Wishart prior for Sigma.
[numeric(J - 2)]
The mean vector of the normal prior for d .
[matrix(J - 2, J - 2)]
The covariance matrix of the normal prior for d.
A priori-distributions:
\(\alpha \sim N(\mu_{\alpha_0}, \Sigma_{\alpha_0})\)
\(s \sim Dir(\delta)\)
\(b_c \sim N(\mu_{b_0}, \Sigma_{b_0})\) for all \(c\)
\(\Omega_c \sim IW(n_{\Omega_0}, V_{\Omega_0})\) for all \(c\)
\(\Sigma \sim IW(n_{\Sigma_0}, V_{\Sigma_0})\)
\(d \sim N(\mu_{d_0}, \Sigma_{d_0})\)
check_prior(P_f = 1, P_r = 2, J = 3, ordered = TRUE)
Run the code above in your browser using DataLab