fit <- stan_polr (FWS1 ~ Ethnic1 + Fam1 + Eco1+ Health1 + Safety1
+ Community1 + Religios1 + Housing1, data = as.data.frame (BayesOrdinal1),
method = “logistic”, prior = lkj(regularization, scale, df),
prior_counts = dirichlet(1), init_r = 0.1, seed = 12345,
algorithm = “sampling”)
#### Covariance matrices
# decov(regularization, concentration, shape, scale)`
# lkj(regularization, scale, df)`
In rstanam package we have many options of choosing prior. One of theses options is covariance matrix.
Could any one guide me how to apply this prior in the model, please?
How to used covariance matrix as a prior?
EDIT(@maxbiostat): escaped code.
Different models in rstanarm have different parameterizations and thus accept different priors. In the case of
prior argument must be a call to the
R2 function in order to say what you think the R^2 of the latent utility is. There is no correlation (not covariance) matrix to put an LKJ prior on.
Thanks a lot for your response.
You said “There is no correlation (not covariance) matrix to put an LKJ prior on”.
Is that mean that it is impossible to used an LKJ prior or another prior different than R2 or uniform prior in stan polr () funxtion?
If No, it is possible. Which the other priors and how to used it? For example Dirichlet prior ?
stan_polr function has very limited options: The prior on the coefficients is implied by the (beta) prior on the R^2 and the prior on the cutpoints is implied by the Dirichlet prior on the probabilities that of an observation with average predictors falling in each outcome category. If
does not explain things clearly enough, there is also a vignette