Logistic regression model using the non-linear modelling syntax

56 views
Skip to first unread message

John Kirwan

unread,
Mar 19, 2018, 9:30:00 AM3/19/18
to brms-users
Dear google-group users,

I have been attempting to apply a multilevel logistic regression with an estimated lower asymptote (and/or an upper asymptote), using the non-linear model formulation in brms. E.g.

fit_4 <- brm(bf(success ~ lower_asym + (1 - lower_asym) * inv_logit(eta), 
                  eta ~ 0 + arc.s + (1|animal), 
                   lower_asym ~ 1, nl = TRUE),
                   data = worms, family = bernoulli("identity"), 
                            prior = c(prior(normal(0, 5), nlpar = "eta") , prior(normal(0.2, 0.01), nlpar = "lower_asym")))

I notice that it is necessary to exclude the intercept of eta, when including the asymptote. This appears to have the consequence of predetermining the location of the inflection point. Is it possible to estimate both the asymptote and the eta intercept, for instance by making one additive upon the other, within brms?

P.S: Thank you to Paul Brükner for producing the non-linear modelling vignette and directing me to it. 

Kind regards,
John

Paul Buerkner

unread,
Mar 19, 2018, 9:36:03 AM3/19/18
to John Kirwan, brms-users
Why should it be necessary to exclude the intercept?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/brms-users/e2c4b7ac-0012-410a-9a55-2b9765eddfc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Kirwan

unread,
Mar 19, 2018, 9:42:32 AM3/19/18
to brms-users
This was in reference to the part of the vignette reading: 'We did not estimate an intercept for eta, as this will lead to a bias in the estimated guessing parameter (try it out; this is an excellent example of how careful one has to be in non-linear models).'

(I was of the impression that Stan might not be able to identify the model if there was a potential overlap in these estimated parameters.)


On Monday, 19 March 2018 14:36:03 UTC+1, Paul Buerkner wrote:
Why should it be necessary to exclude the intercept?
2018-03-19 14:30 GMT+01:00 John Kirwan <jo...@jkirwan.org>:
Dear google-group users,

I have been attempting to apply a multilevel logistic regression with an estimated lower asymptote (and/or an upper asymptote), using the non-linear model formulation in brms. E.g.

fit_4 <- brm(bf(success ~ lower_asym + (1 - lower_asym) * inv_logit(eta), 
                  eta ~ 0 + arc.s + (1|animal), 
                   lower_asym ~ 1, nl = TRUE),
                   data = worms, family = bernoulli("identity"), 
                            prior = c(prior(normal(0, 5), nlpar = "eta") , prior(normal(0.2, 0.01), nlpar = "lower_asym")))

I notice that it is necessary to exclude the intercept of eta, when including the asymptote. This appears to have the consequence of predetermining the location of the inflection point. Is it possible to estimate both the asymptote and the eta intercept, for instance by making one additive upon the other, within brms?

P.S: Thank you to Paul Brükner for producing the non-linear modelling vignette and directing me to it. 

Kind regards,
John

--
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.

Paul Buerkner

unread,
Mar 19, 2018, 9:48:04 AM3/19/18
to John Kirwan, brms-users
I couldn't remember myself saying that... The reason is just that we didn't include the intercept in when simulating the data. Now, when estimating the model with an intercept, the other parameters will of course be changed. I might revise this part of the vignette in order to avoid confusion.

For your purpose, I don't see a problem with including the intercept.

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.

John Kirwan

unread,
Mar 19, 2018, 9:50:54 AM3/19/18
to brms-users
OK, thank you for your help.
Reply all
Reply to author
Forward
0 new messages