Page 1 of 1

generalized linear model: ¿'distribution' and 'link function'?

Posted: Fri May 12, 2023 10:52 am
by vliborio
Good morning everyone, this is my first question in the forum and maybe quite simple but I'm trying to launch a generalized linear model in Jamovi and I was wondering when you choose 'custom model', what's the difference between 'distribution' and 'link function'?
Also, I'd like to know when you've launched a GLM and in the AIC or BIC appears 'Inf', what does it mean?

Thanks in advance and congratulations on the software, it's amazing!

Re: generalized linear model: ¿'distribution' and 'link function'?

Posted: Tue May 16, 2023 1:50 pm
by mcfanda@gmail.com
A generalized linear model is a linear model in which the dependent variable is not a continuous normally distributed variate, but a variable of different types, such as a dichotomous or politomous variable, or a count variable, an ordinal variable, etc. depending on the specific application. To accommodate that, the linear function does not assume a normal distribution, but allows for different types of distribution. So, that is the meaning of "distribution": you can pick different distributions depending to the type of variable you have. "Binomial", for instance, works for dichotomous dependent variables, whereas "Poisson" works with count data (in theory).

To accommodate for the fact that the dependent variable is not continuous, the predicted values should be expressed in a different scale than the original variable scale, because the linear model can fit only continuous predicted values, ranging from -Inf to Inf (any real number should be make sense in the scale of the predicted values). Thus, the model predicts a "transformation" of the fitted values: The transformation is the link function. In logistic, for instance, the original scale is the probability of being in one group rather than the other. The link function is the logit function, which transform a measure ranging from 0 to 1 into a scale from -Inf to Inf, so it does the work.

Re: generalized linear model: ¿'distribution' and 'link function'?

Posted: Tue May 16, 2023 4:35 pm
by mcfanda@gmail.com
Here is some material you may read about it https://gamlj.github.io/book/gzlm.html

Re: generalized linear model: ¿'distribution' and 'link function'?

Posted: Wed May 24, 2023 1:08 pm
by mcfanda@gmail.com
What do you mean exactly by "the exact requirements of the algorithms to bring the best efficiency to the final result."?

Re: generalized linear model: ¿'distribution' and 'link function'?

Posted: Fri May 26, 2023 2:04 am
by jonathon
that was spam, mc ... i've deleted it

Re: generalized linear model: ¿'distribution' and 'link function'?

Posted: Fri May 26, 2023 10:12 am
by vliborio
Hi mcfanda! First of all thank you a lot for the answer, it's been really helpful. Nevertheless, I have still some points that I didn't get about the 'link function'.
This function is for data that does not follow that available distributions in Jamovi (Gaussian, Poisson, etc.) and with this function you transform this data into one of the distributions aforementioned? Taking the example you gave, in logistic we apply a 'Logit' and then this will follow one of those distributions?.

Thank you again for your anwser!
Bests,

Re: generalized linear model: ¿'distribution' and 'link function'?

Posted: Mon May 29, 2023 10:31 am
by vliborio
mcfanda@gmail.com wrote: Wed May 24, 2023 1:08 pm What do you mean exactly by "the exact requirements of the algorithms to bring the best efficiency to the final result."?
Hi mcfanda! First of all thank you a lot for the answer, it's been really helpful. Nevertheless, I have still some points that I didn't get about the 'link function'.
This function is for data that does not follow that available distributions in Jamovi (Gaussian, Poisson, etc.) and with this function you transform this data into one of the distributions aforementioned? Taking the example you gave, in logistic we apply a 'Logit' and then this will follow one of those distributions?.

Thank you again for your anwser!
Bests,

Re: generalized linear model: ¿'distribution' and 'link function'?

Posted: Mon Jun 26, 2023 1:33 pm
by mcfanda@gmail.com
The link function is the function a generalized linear model uses to scale the predicted values, not the actual data. It is not a jamovi or any other software thing. It's the mathematics of the generalized linear model that requires a function to express the predicted values in a way that is compatible with the linear model.

You can find details in Agresti (2015) Foundations of Linear and Generalized Linear Models, in the links mentioned in the previous posts, or any source that explains the generalized linear model. To get the meaning of the link function you need to have very clear how the generalized linear model works (independently of the software you use)