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?
Gamlj_predict for logistic models
Re: Gamlj_predict for logistic models
I guess it could be probabilities on the logit scale so I am converting from logit ... hopefully, this is correct
- mcfanda@gmail.com
- Posts: 462
- Joined: Thu Mar 23, 2017 9:24 pm
Re: Gamlj_predict for logistic models
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