# Questions tagged [generalized-linear-model]

A generalization of linear regression allowing for nonlinear relationships via a "link function" and for the variance of the response to depend on the predicted value. (Not to be confused with "general linear model" which extends the ordinary linear model to general covariance structure and multivariate response.)

1,598 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
340 views

### Correlation between two binary variables within one categorical variable

The Problem: I have measured two binary variables within 1 categorical variable with 5 levels. Initially, I thought I'd be able to use Fisher's Exact test or some $N \times M \times K$ version of it. ...
• 571
2k views

### "weight" input in glm.nb function in R. How exactly does the weight affect the likelihood?

I would like to understand how the weight argument of glm.nb is affecting the likelihood function. I understand that glm.nb find ...
• 965
500 views

### How do sufficiency statistics help in the interpretation of regression results?

One of the results why canonical link functions are widely used in GLMs is the existence of sufficiency statistics for the regression parameters, which in turn allow for: ... minimal sufficient ...
• 4,452
6k views

### Getting the bootstrap-validated AUC in R

In a paper by Faraklas et al, the researchers create a Necrotizing Soft-Tissue Infection Mortality Risk Calculator. They use logistic regression to create a model with mortality from necrotizing soft-...
• 1,033
1k views

### Alternatives to Cohen's d for non-Gaussian models

Cohen's d (or Hedges' g) are often used to compute effect size. They rely on the assumption of homogeneity of variance across samples however. Because of the pooling of variance that they do, I'm also ...
• 482
324 views

### Nonnegative identity-link Poisson regression with ridge or fused ridge penalty

I would like to fit nonnegative identity-link Poisson regression models with a ridge or fused ridge penalty, i.e. with nonnegativity constraints on the fitted coefficients, Poisson error noise & a ...
• 3,279
417 views

### Robust Gamma Regression

I am modeling some spectroscopic data where the response of the instrument to the size of the input is strictly positive and non-linear. Gamma regression seems like a good choice to explain the data, ...
• 223
839 views

### Time series models (e.g. ARMA) a type or extension of GLM? Particular/stipulated forms of dependence in time series models

I am trying to understand the relationship between ARMA Time Series models and the GLM (Generalized Linear Model) family of models. As far I know, all GLMs have the following 3 components: 1) random ...
• 4,758
715 views

### Adding a magnitude penalty to a GAM

This is a follow-up to a previous question of mine, explaining the problem in more detail in the hopes of getting more precise advice. Consider the following structured additive regression model or ...
• 11k
2k views

### How to compare models with different distributional assumptions for response variable in GLM?

Let's say I have measurements $Y$ which are all positive, and the distribution seems to be somewhat skewed. I'm modelling $Y$ in GLM framework. Now I could set my GLM using different distributional ...
• 136
2k views

### Geometric Interpretation of Softmax Regression

I'm writing a series of blog posts on the basics of machine learning, just for fun, mostly to validate my understanding of Andrew Ng's class. As I'm currently studying generalized linear models (GLMs),...
• 613
118 views

### Zero values and discontinuity in explanatory variable

One of my independent variables measures worker productivity through the variable $\frac{\log{sales}}{\text{# of workers}}$, and I'm creating one variable for skilled and another for unskilled workers....
• 104
2k views

### Analysis of survival data using binomial GLM with offset

We are interested in determining whether there's an association between frequency of screening visits and cancer outcomes and whether that differs by race. We have Medicare data to analyze this. ...
• 63.7k
121 views

### using lmer to fit the linear mixed effects models

Edit: I know some people vote this question is off-topic since it is more like a Cross Validated question. However, I am not here to ask about the coding thing (but I might word in the wrong way). I ...
• 671
1k views

### Standard error of the coefficient in GLM

I'm trying to learn about Wald test. I know, that its test statistics is $$t = \frac{\beta_i}{se\left( \beta_i \right)}$$ But, how is standard error $se$ computed in GLM? I've found only the ...
• 483
2k views

### Segmented regression in R: interpreting the other coefficients

I am running segmented regression using the R package 'segmented'. The original binomial logistic regression has two coefficients, approach_km (continuous), and sea (dichotomous) that explain the ...
• 521
142 views

### Question concerning svydesign and svyglm in R

I have a complicated data set which was made by a multistage stratified cluster design. I had originally analysed this using glm, however now realise that I have to use svyglm. I'm not quite sure ...
569 views

### Autocorrelation in Poisson model's residuals - Is my model not specified correctly?

I am fitting a poisson regression model in R to count time series data to perform an Interrupted Time Series Analysis, the aim of my analysis is to see if an intervention affected the counts. I am ...
422 views

### IRLS for truncated normal GLM

I have data for which responses fall in $y \in [0,\infty)$ for which, it seems, the standard GLMs based on, say, gamma or inverse-Gaussian fail since they don't allow responses with values equal to 0. ...
• 553
199 views

### Modelling % cover that do not add up to 100% : GLM distribution families

I have an experimental set-up that consists in studying the impact of diversity of plant mixtures on the development of invasive species. On each plot, we recorded the % cover of each species which ...
• 311
187 views

### Which approach can be used to regress sleep time on brain mass, in this data set?

I was reading this blog post: https://htmlpreview.github.io/?https://raw.githubusercontent.com/avehtari/BDA_R_demos/master/demos_rstan/sleep.html the author describes a model to predict how many ...
• 18.2k
67 views

### Why is the $\chi^{2}$ approximation for deviance GLM $\sim \operatorname{Binomial}(n_{i},\pi_{i})$ not valid when $n_{i} = 1$?

I know from McCullagh & Nelder's text (p.118) that the $\chi^{2}$ approximation for deviance for the binomial family is based on a limiting operation in which $n$, the number of observations, is ...
585 views

### Why is the deviance $\chi^{2}_{n-p}$ distributed?

Consider a GLM with vector of parameters $\boldsymbol{\beta}$, the maximum likelihood estimates of the non-saturated model (no. of parameters = $p < n$) is $\boldsymbol{\hat{\beta}}$ and the ...
277 views

### Bradley-Terry model for unequal team comparisons

I'm trying to predict the outcome of a sports match between two teams. I have data on wins and losses for all teams in the league. I intend to use a Bradley-Terry model to find the relative rankings ...
• 4,787
2k views

### What's the relation between Canonical Correlation Analysis (CCA) and Regression?

I'm wondering if CCA is just a feature transformation method. Can I use it for predicting continuous variables like in regression methods? What I'm doing is to use CCA to transform my training and ...
• 571
79 views

### Is this degrees of freedom calculation from McCullagh and Nelder wrong?

This is a question regarding the Generalized Linear Models book of Mccullough and Nelder. It's available here. Starting on page 204 there is an example regarding shipping incidents; one of the ...
• 8,952
2k views

### Covariance matrix of multivariate multiple regression coefficients

I would like to perform a regression analysis on a dataset comprising one independent variable (X) and two dependent variables (Y1 and Y2) which may be affected by correlated errors. R's stats::lm ...
• 51
2k views

### Spatial Autoregressive Poisson model in R

I am estimating a gravity model of migration on cross-sectional data. The Moran I statistic indicates a positive and significant spatial autocorrelation in the residuals of the non-spatial model, and ...
• 151
279 views

### Dispersion parameters in GLM

I'm trying to find the motivation behind the extended form of the exponential family of distributions in the fundamental paper on GLM by Nelder and Wedderburn (Generalized Linear Models, J. R. Statist....
270 views

### What is the mathematics behind the GAM prediction intervals?

From the R gam function available in the gam and mgcv package there is the option to obtain ...
• 3,179
780 views

### How does GEE (Generalized Estimating Equation) treat different cluster size?

I have a population of 200,000+ patients and their hospital visit information. I'm trying to see if having a certain disease would have an effect on whether they will have readmission or not (this is ...
1k views

### How can I evaluate spatial autocorrelation in a binomial GLMM?

Following Dormann et al 2007 Ecography, I have employed a GLMM approach in R to account for spatial autocorrelation in a binomial regression model (logistic regression) that does not have random terms....
• 614
3k views

### Paired test using GLM with Gamma distribution

I know, that a paired T-test can be formulated in the framework of a linear model for gaussian distributions. I have two vectors of paired mesurements (rates under certain conditions) that follow a ...
• 71
489 views

### Why do my boostrapped CI's (using boot.ci in R) not include the point estimate?

I'm interested in estimating an average treatment effect $$\operatorname{ATE}\left(A', A''\right) = \mathbb{E}\left( Y\ |\ A'' \right) - \mathbb{E}\left( Y\ |\ A' \right)$$ with a generalized ...
• 12.8k
699 views

2k views

### How do I choose the correct power in a tweedie GLM?

I'm developing a GLM with a tweedie family distribution. How do I choose P correctly and how much does it matter? I know it has to be between 1 and 2, and when I try different values, I don't see an ...
• 235
286 views

701 views

### Partitioning data into train and test sets in generalized linear mixed models

please excuse my probable lack of knowledge in machine learning - I am a vet trying hard to find my way around in this somewhat new world. The data I am analyzing was collected on 5 different farms, ...
• 41
73 views

### Would this modification accelerate convergence of generalized linear model, or break it?

This page describes the following iteratively reweighted linear least-squares (IRLS) method for solving a generalized linear model (GLM): let $x_1=0$ for $j=1,2,...$ do linear ...
• 375
### GLM and saturated models: how do we justify the relation $\hat{\mu}_{i} = y_{i}$?
Given the saturated generalized linear model $g(\mu) = \eta = \textbf{X}\beta$, where the number of parameters equals the number of observations, why do we have $\hat{\mu}_{i} = y_{i}$? Let's us take ...