# Tag Info

## Hot answers tagged generalized-linear-model

### How to decide which glm family to use?

Generalized linear model is defined in terms of linear predictor $$\eta = \boldsymbol{X} \beta$$ that is passed through the link function $g$: $$g(E(Y\,|\,\boldsymbol{X})) = \eta$$ It models ...
• 139k
Accepted

### Why using Newton's method for logistic regression optimization is called iterative re-weighted least squares?

Summary: GLMs are fit via Fisher scoring which, as Dimitriy V. Masterov notes, is Newton-Raphson with the expected Hessian instead (i.e. we use an estimate of the Fisher information instead of the ...
• 20.4k
Accepted

### Is there any intuitive explanation of why logistic regression will not work for perfect separation case? And why adding regularization will fix it?

A 2D demo with toy data will be used to explain what was happening for perfect separation on logistic regression with and without regularization. The experiments started with an overlapping data set ...
• 37k
Accepted

### What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?

Your premise that the elapsing of 40 years means that "surely things have changed" is quite dubious in a field relating to applied mathematics. In mathematical work it is often the case ...
• 127k
Accepted

### How do you deal with "nested" variables in a regression model?

Meaningless values of nested variables must not affect your model: The crucial desideratum with this type of data analysis is that the nested variable must not ...
• 127k
Accepted

• 63.1k

### What important ideas came since Nelder and McCullagh's book Generalized Linear Models (a 40 year old book)?

In addition to Ben's great answer (+1): Penalised regression models ($L_1$, $L_2$, elastic net, SCAD (Smoothly clipped absolute deviation), LARS (least-angle regression), MCP (Multiple Change Points),...
• 44.5k
Accepted

### What is the difference between logistic regression and Fractional response regression?

If your question is: what is the difference between these two codes? A look at ?glm says ...
• 2,016
Accepted

### How is a Poisson rate regression equal to a Poisson regression with corresponding offset term?

This also confused me. I thought, "what is the point of explicitly including an offset instead of just pretending that the response divided by the offset / exposure is the $y$ value?". You actually ...
• 342

### Family of GLM represents the distribution of the response variable or residuals?

Further to Kjetil's excellent answer, I wanted to add some specific examples to help clarify the meaning of a conditional distribution, which can be a bit of an elusive concept. Let's say you took a ...
• 20.5k

### Which optimization algorithm is used in glm function in R?

The method used is mentioned in the output itself: it is Fisher Scoring. This is equivalent to Newton-Raphson in most cases. The exception being situations where you are using non-natural ...
• 63.1k

### R - lmer vs glmer

lmer is used to fit linear mixed-effect models, so it assumes that the residual error has a Gaussian distribution. If your dependent variable A is a binary outcome (...
• 3,253

### Interpretation of .L & .Q output from a negative binomial GLM with categorical data

Your variables aren't just coded as factors (to make them categorical), they are coded as ordered factors. Then, by default, R fits a series of polynomial functions to the levels of the variable. ...
Accepted

### Why exactly can't beta regression deal with 0s and 1s in the response variable?

Because the loglikelihood contains both $\log(x)$ and $\log(1-x)$, which are unbounded when $x=0$ or $x=1$. See equation (4) of Smithson & Verkuilen, "A Better Lemon Squeezer? Maximum-Likelihood ...
• 589
Accepted

### What to do with GLM (Gamma) when residuals are not normally distributed?

Residuals in glm's such as with the gamma family is not normally distributed, so simply a QQ plot against the normal distribution isn't very helpful. To understand this, note that the usual linear ...
• 79.6k
Accepted

### Do test scores really follow a normal distribution?

Height, for instance, is often modelled as being normal. Maybe the height of men is something like 5 foot 10 with a standard deviation of 2 inches. We know negative height is unphysical, but under ...
• 37.3k