Gamlj_predict for logistic models

Discuss statistics related things
Post Reply
Whirly123
Posts: 31
Joined: Mon May 06, 2019 3:07 pm

Gamlj_predict for logistic models

Post by Whirly123 »

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: 31
Joined: Mon May 06, 2019 3:07 pm

Re: Gamlj_predict for logistic models

Post by Whirly123 »

I guess it could be probabilities on the logit scale so I am converting from logit ... hopefully, this is correct
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Gamlj_predict for logistic models

Post by mcfanda@gmail.com »

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
Post Reply