Multivariate Non-Linear Priors

248 views
Skip to first unread message

Bell

unread,
Apr 3, 2018, 7:20:17 AM4/3/18
to brms-users
Hello,

I'm currently running a multivariate non-linear model in BRMS with priors. The prior() works fine for me if I have my model set-up in BRMS as such:
fit <- brms(
         bf(Y1 ~ 0 + alpha + (betaX1 * X1 ^ powerX1) + (betaX2 * X2 ^ powerX2) + ... ,
         alpha + betaX1 + betaX2 + ... ~ 1 ,
         nl = TRUE) ,
         ... ,
         prior = c(prior("normal(0.005,3)", lb = 0.000001, ub = 10, nlpar = "betaX1"),...) ,
         ....)

But if I introduced more response variables (Y2, Y3) into the model
fit <- brms(
         bf(cbind(Y1,Y2,Y3) ~ 0 + alpha + (betaX1 * X1 ^ power_X1) + (betaX2 * X2 ^ powerX2) + ... ,
         alpha + betaX1 + betaX2 + ... ~ 1 ,
         nl = TRUE) ,
         ... ,
         prior = c(prior("normal(0.005,3)", lb = 0.000001, ub = 10, nlpar = "betaX1"),...) ,
         ....)
the prior does not work anymore because it was looking for b_betaX1, etc. Error was “The following priors do not correspond to any model parameter: <lower=1e-06,upper=10> b_betaX1~ normal(0.005,3)”.


These were the steps I have tried:
1.  Changing model declaration from betaX1 to b_betaX1 . Error was Some non-linear parameters are missing in formula: betaX1, …
2. Updated parameters also to b_betaX1 , etc. Error was Parameter names should not contain dots or underscores”.

Is my syntax wrong? Appreciate any help on this.

Paul Buerkner

unread,
Apr 3, 2018, 7:37:06 AM4/3/18
to Bell, brms-users
Use argument 'resp' in prior().

--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+...@googlegroups.com.
To post to this group, send email to brms-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brms-users/6b237dee-f623-411d-b4bd-e4787470a9b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bell

unread,
Apr 3, 2018, 11:00:17 PM4/3/18
to brms-users
Oh, right the solution was actually simple. Thank you!

Laure W.

unread,
Jun 13, 2018, 9:12:28 AM6/13/18
to brms-users
Hi!

I'm getting the same error message trying to set a (horseshoe) prior on the population-level coefficients for a multi-logistic regression model with >2 outcome categories. I figured I need to use the resp option, but I must still be doing something wrong. I still get the same error message
Error: The following priors do not correspond to any model parameter:

Could you please post your working code so I can compare it to mine? I'd appreciate the help.

Paul Buerkner

unread,
Jun 13, 2018, 9:13:44 AM6/13/18
to Laure W., brms-users
The brms forums have moved to discourse.mc-stan.org. Please ask your question there.

Also, please show us your code, which greatly helps in debugging the problem.

--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.

To post to this group, send email to brms-...@googlegroups.com.

Laure W.

unread,
Jun 13, 2018, 9:34:57 AM6/13/18
to Paul Buerkner, brms-users
Thank you, I will do that. 

Op wo 13 jun. 2018 15:13 schreef Paul Buerkner <paul.b...@gmail.com>:
The brms forums have moved to discourse.mc-stan.org. Please ask your question there.

Also, please show us your code, which greatly helps in debugging the problem.
2018-06-13 15:12 GMT+02:00 Laure W. <laurew...@gmail.com>:
Hi!

I'm getting the same error message trying to set a (horseshoe) prior on the population-level coefficients for a multi-logistic regression model with >2 outcome categories. I figured I need to use the resp option, but I must still be doing something wrong. I still get the same error message
Error: The following priors do not correspond to any model parameter:

Could you please post your working code so I can compare it to mine? I'd appreciate the help.



On Wednesday, April 4, 2018 at 5:00:17 AM UTC+2, Bell wrote:
Oh, right the solution was actually simple. Thank you!

--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages