Page 1 of 1

Gamlj_predict for logistic models

Posted: Fri Jul 17, 2020 6:15 pm
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?

Re: Gamlj_predict for logistic models

Posted: Fri Jul 17, 2020 6:34 pm
by Whirly123
I guess it could be probabilities on the logit scale so I am converting from logit ... hopefully, this is correct

Re: Gamlj_predict for logistic models

Posted: Sun Jul 19, 2020 1:49 pm
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