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,008 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
177 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 x M x K version of it. However I ...
7
votes
1answer
961 views

Comparing two multinomial distributions

Background: Imagine a pizza cut into 8 slices. On each straight edge of the slice, I insert a magnet with opposite polarities facing outwards. If I separate these components, prevent flipping and ...
6
votes
0answers
59 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, ...
6
votes
1answer
116 views

Can you simultaneously fit logistic and ordinal logistic regression models?

I have some response data that has the 5 following categories: strongly agree somewhat agree somewhat disagree strongly disagree don't know I want a two component model that uses a logistic ...
6
votes
0answers
8k views

Comparing models using the deviance and log-likelihood ratio tests

This is an update to a previous question that I have posted. I am looking for clarification on comparing glm models using deviance and log-likelihood ratio tests (I have updated my question to make it ...
6
votes
1answer
11k views

VIF for generalized linear model

Is the variance inflation factor useful for GLM models. Below example shows OLS is showing VIF>5, but GLM lower. GLM shows instability in the coefficients between train and test set. ...
6
votes
0answers
1k 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 the MLE in an alternating iteration process where for a given theta the ...
6
votes
0answers
964 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 ...
5
votes
0answers
152 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 ...
5
votes
2answers
319 views

Does the VIF make sense for a model with categorical variables?

I'm trying to detect multicollinearity in my model, it has count response variable and some proportional and one categorical explanatory variable called site. In R the model looks like this: ...
5
votes
0answers
173 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 ...
5
votes
0answers
205 views

Identifiability in generalized linear random effect model?

Suppose I observe binary $Y_{ij}$ for $i = 1, ..., N$ and $j = 1, ..., J$ and I want to model $$\Pr(Y_{ij} = 1 \mid \lambda_{i}) = \Phi(\lambda_{ij}), \qquad [Y_{ij} \perp Y_{ij'} \mid \lambda_i]$$ ...
5
votes
1answer
2k views

creating contrast matrix (limma) for two factorial in R

I am attempting to construct a contrast matrix that I can run in R, using the limma bioconductor package, but I am not sure that I have coded the contrast matrix correctly. A previous post and the ...
5
votes
0answers
1k 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. ...
5
votes
0answers
2k views

Examples of spatial generalized linear models

I've been reading some materials on Spatial data analysis, and I've a good background in GLMs. Right now I'm looking to find an example in spatial generalized linear models, but so far I've not found ...
4
votes
1answer
73 views

Should I use a linear mixed model or a generalized mixed model?

I have a test dataset with repeated measures, different individuals sampled at different time points, here measured in days. I want to know if I should use a GLMM or a LMM to see how well, if at all, ...
4
votes
0answers
67 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 ...
4
votes
1answer
52 views

How are distributions and regression models related?

This is likely a very simple question for many of you but is something that has been poorly covered in the statistics courses I've taken to date. We have talked extensively about distributions (normal,...
4
votes
0answers
117 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. ...
4
votes
0answers
262 views

Different goodness-of-fit statistics for same model fit as GLM and linear mixed model - why?

When I fit a simple linear model such as y ~ 1 + x1 + x2 in MATLAB R2018a or R2017a, the fitglm() and ...
4
votes
1answer
69 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 ...
4
votes
0answers
514 views

Why using offset for a Gamma (link=log) glm doesn't yield the same predicted average response as the average observed?

One of my analyst asked me why his Gamma/link=log glm with offsets was always overstating his observed data points. I was able to reproduce the behavior in R with intercept only glm using offsets. ...
4
votes
1answer
318 views

Quasi-poisson for underdispersed data

Related to glm() in R, I saw a few post recommending modeling underdispersed data using the Conway–Maxwell–Poisson distribution, specifically with the R package <...
4
votes
0answers
101 views

Can I get away with using GLM models on “pseudo-panel” big N small time=T data?

Suppose I have a kind of panel data set, where we track the investment totals of a great many customers, which may be highly variable, and is measured on a monthly basis over the course of 7-10 years. ...
4
votes
0answers
55 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 ...
4
votes
0answers
273 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
votes
0answers
67 views

GLMM for binomially distributed outcome, testing differential hypothesis

I am trying to find a way, to investigate differences between conditions in an experiment. The design is as follows: Depended Variable: Logical (answer is correct [correct accepted or correct ...
4
votes
0answers
74 views

all regressions: coefficients interpretation

good morning to all, I open this topic with the intention of being useful to me but also to many in my situational. I would like to clarify the "interpretation" of the coefficients in the regression. ...
4
votes
0answers
228 views

Connecting Poisson and multinomial models

Let's say we have multinomial counts $y_{jp}$ (corresponding to observations $j$ over categories $p=1,...P$) that are arranged in a table of $n$ rows and $P$ columns. Then say we have the log-linear ...
4
votes
0answers
1k views

Random or fixed effects? GLM or GLMM?

I am interested in the behavioral response of floral visitors to a treatment, applied in a paired fashion within plants. That is, one stem on each plant receives the treatment, and another stem serves ...
4
votes
1answer
126 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 ...
4
votes
0answers
55 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 ...
4
votes
0answers
79 views

Post-Production Model Monitoring?

I am interested in model monitoring techniques. To be clear, for production of a statistical model, let's say GLM, with a set of covariates (continuous). The model will go into production (live ...
4
votes
0answers
1k views

How to fit a regression for log-normal with gamlss

Since my original question was to R-code-specific I'm trying to rewrite it: I want to make a regression where my dependent variable y should follow a log-normal-...
4
votes
0answers
926 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 ...
4
votes
0answers
161 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....
4
votes
0answers
606 views

How a tweedie glm handles an offset?

I am trying to fit a model with a glm using a tweedie family. I use a index parameter p between 1 and 2 to get a compound Poisson Gamma distribution to fit my data. But I want to use an offset only on ...
4
votes
0answers
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....
4
votes
0answers
501 views

Paper showing that logistic regression intercept biased in rare events

I'm studying the logistic regression for estimate the Probability of Default of SME's. Fortunately the event (firm's default) is a rare event. King and Zeng tell us that "logistic regression can ...
4
votes
0answers
686 views

Data analysis : replication, pseudoreplication and mixed models

I have several questions concerning analysis of data, especially when there are replications and/or pseudoreplications. First, I read an example in « pseudoreplication is a pseudoproblem » where we ...
4
votes
0answers
370 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 ...
4
votes
0answers
276 views

What properties of a likelihood function are required for quasi-likelihood estimation?

Quasi-likelihood seems like a great way to use Iteratively Weighted Least Squares to fit linear models with a very general class of likelihoods. But what is that class? Obviously the distribution ...
4
votes
0answers
442 views

How to fit log-linear poisson autoregressive mixed model?

I have time-series count data $N_{i,j}$ (population sizes in site $i$ and year $j$) and I want to correlate year-to-year changes with the environmental conditions $x_{i,j}$. For this, I want to fit ...
4
votes
0answers
277 views

Can I use weights generated by robust regression in a quasipoisson glm in R?

I have response variable count data that should be treated as quasipoisson or something similar. This data also contains outliers which are important to the dataset. I cannot find an r package that ...
4
votes
0answers
1k 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),...
4
votes
0answers
902 views

How to write a mathematical equation for GLM model with gamma and gaussian distribution?

I am writing a paper and the following is a code that I wrote in R. The reason that I am struggling with this is because I tried hundreds of models with different variables and the following model ...
4
votes
0answers
4k 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-...
4
votes
0answers
1k views

Finite mixture models with bounded data

I am trying to fit a finite mixture model to a dependent variable which is bounded (practically) between -0.594 and 1 (theoretically, the latent variable is bounded between -Inf - 1). The data are ...
4
votes
0answers
229 views

GLM experimental design issues for count data in landscape experiment

I am analyzing bird count data from surveys conducted each week (from Nov-April, when bird foraging most active near breeding cycle) for 6 years in 9 large experimental plots that are split amongst 3 ...
4
votes
0answers
438 views

Generalized Linear Models and Curse of Dimensionality

I was wondering what happens to bias and variance of GLM estimates as dimensionality approaches the number of training data points? Specifically in Linear Regression and Poisson Regression? I know ...