Contents
What is the difference between LM and GLM?
t-distribution is used in lm while normal distribution is used in glm when constructing the intervals. Longer answer; The glm function fits the model by MLE, however, because of the assumption you made about the link function (in this case normal), you end up with the OLS estimates.
What is a Gaussian family?
Gaussian family : for continuous decimal data with normal distribution, like weight, length, et al. Poisson or quasipoisson family: for positive integer or small natural number like count, individual number, frequency.
What is GLM and LM?
lm fits models of the form: Y = XB + e where e~Normal( 0, s2 ). glm fits models of the form g(Y) = XB + e , where the function g() and the sampling distribution of e need to be specified. The function ‘g’ is called the “link function”.
What’s the difference between GLM family and Gaussian family?
There is a hard-wired option for this, specified via family=”gaussian” (which is also the default for glmnet ). Now we can also use family = gaussian () to fit the same model. glmnet distinguishes these two cases because the first is a character string, while the second is a GLM family object.
What does g ( y ) mean in LM and GLM?
In LM we have a g (Y) = XB. In GLM we have a g (E [Y]) = XB It means that in LM we model a function of Y, and in GLM we model a function of the mean of Y. – igorkf Apr 12 at 19:12 ( y) = x + ε. Instead, your example is x = log
Why do we use family objects in GLM?
Family objects provide a convenient way to specify the details of the models used by functions such as glm. See the documentation for glmfor the details on how such model fitting takes place.
How to choose between LM and GLM for a log-transformed?
For your more general question, a good way of focusing on the problem is to consider the difference between LOG.LM (your linear model with the response as log (y)); and LOG.GAUSS.GLM, the glm with the response as y and a log link function. In the first case the model you are fitting is: and in both cases ϵ is distributed N ( 0, σ 2).