1

I'm attempting to run a Bayesian Hierarchical model using MCMChregress, but don't know to fix the problem expressed by this error. My code is below. I believe the problem has to do with the R and r argument and how they relate to the number of parameters. So I didn't include the data set. Let me know if any additional information would be helpful!

"Error: in Wishart(r,rR) prior, R not comformable [q times q].
Error in form.wishart.prior.hmodels(r, R, nq) : 
  Please respecify and call MCMChregress() again."

#bayesian hierarchical
bhlm.2 = MCMChregress(
  fixed = nip_wk_avg ~ unique_elements + vbs.theme_relevance +
    vbs.total_score + vbs.product_attributes +
    Super_Segment + vbs.play_promise +
    vbs.visual_appeal + outgoing + pp79.99 + pp19.99,
  random = ~ unique_elements + vbs.theme_relevance +
    vbs.total_score + vbs.product_attributes +
    Super_Segment + vbs.play_promise +
    vbs.visual_appeal + outgoing + pp79.99 + pp19.99,
  group = "Super_Theme", data = train.data,
  r = 20, R = diag(20))
mgsberger
  • 21
  • 4

0 Answers0