I have some data on prices that I would like to predict as a function of covariates. One of those covariates is the predicted rating of that item as estimated from totally separate item rating data. I would like to treat this covariate as an out-of-sample prediction. So I would load the separate price and ratings data in the data step, estimate the parameters of the rating distribution in the model step, and then estimate the parameters of the price model given a proposal from the posterior predictive distribution of ratings.
Is this possible in Stan? Thank you.
P.S. Let me know if you need more details to formulate an answer. I hope this is enough but maybe not.
rstanarm
package which has as a number of "built-in" models that use syntax you may be familiar with if you've ever usedlme4
. Posterior predictions are quite easy to obtain using this package and there is a growing body of documentation that is easy enough to run through. $\endgroup$