Gamlj_predict for logistic models

Discuss statistics related things

by Whirly123 » Fri Jul 17, 2020 6:15 pm

I am using Gamlj_predict to predict some responses from my Gamlj generalized mixed model model fit.

The responses it predicts seem to be numbers between -3 and 3 when I would have otherwise expected it to predict probabilities (between 0 to 1). For R's regular predict function I would do type="response".

What do I need to do here?
Whirly123
 
Posts: 24
Joined: Mon May 06, 2019 3:07 pm

by Whirly123 » Fri Jul 17, 2020 6:34 pm

I guess it could be probabilities on the logit scale so I am converting from logit ... hopefully, this is correct
Whirly123
 
Posts: 24
Joined: Mon May 06, 2019 3:07 pm

by mcfanda@gmail.com » Sun Jul 19, 2020 1:49 pm

Yes, at the moment `galm_predict` uses the R predict default, which is "link". So, if you need probabilities you need to transform the predicted values back yourself. (which is simply exp(p)/(1+exp(p)). In the next version type="response" will be the default, with the option to specify the "type", as in R predict
User avatar
mcfanda@gmail.com
 
Posts: 217
Joined: Thu Mar 23, 2017 9:24 pm


Return to Statistics

cron