Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.)

8
votes
0answers
174 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 ...
6
votes
0answers
43 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
0answers
1k views

Are $R^2$ for GLMM useful for modelers but not necessarily for readers?

The short version: 1)Are there any published critiques of the use of $R^2$ for GLMMs, in particular the popular approach of Nakagawa & Schielzeth (2013) A general and simple method for obtaining $...
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
922 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
547 views

generalized linear mixed-effects models R^2 and the tweedie distribution

I am modelling data exhibiting a tweedie distribution in R using glmer (package lme4). To compare the models I would like to use the AIC and R^2. I have a couple of question on this (example code at ...
5
votes
0answers
141 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
0answers
162 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
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 ...
5
votes
0answers
7k 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 ...
5
votes
0answers
876 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 ...
5
votes
0answers
202 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
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
0answers
62 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
0answers
231 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
0answers
451 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
0answers
88 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
53 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
247 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
391 views

Can a GLM with exponential response distribution be transformed into a Poisson regression instead?

Given the following generative model $$T | \mathbf{x_i} \sim \operatorname{Exp}(\lambda_i)$$ $$\ln(\lambda_i) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots$$ That is: I have observations of ...
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
78 views

Can you simultaneously fit 2 different 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 ...
4
votes
0answers
73 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
219 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
53 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
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
77 views

Topology of Confidence Intervals

I hope this is the right site to post this. The example I have in my mind is a GLMM model, where we infer random effects, and a random effect caterpillar plot (with confidence intervals): Now, ...
4
votes
0answers
154 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
541 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
488 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
640 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
363 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
258 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
413 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
270 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
854 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
221 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
425 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 ...
3
votes
0answers
62 views
+50

Suggestions on Modeling Approach to Model Percent Complete of a Task

I am trying to predict what percentage (or proportion) of a task is completed by various workers, given the time left until the deadline to complete the task and I'm looking for help on how to ...
3
votes
0answers
91 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
votes
0answers
106 views

Generalized Linear Mixed Effects Logistic Regression with Repeated Measures

I have an experiment where subjects reported multiple results (binary) in two treatments. I have compared each subject separately to see if the treatment had an effect on a given subject, but would ...
3
votes
0answers
92 views

Is the use of loglik or AIC to compare logit/probit/cloglog models valid?

I would like to know whether I can use AIC, or if the models have the same number of predictors, the log-likelihood, to compare logit vs probit vs cloglog models (fitted for instance with glmer or ...
3
votes
0answers
99 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. ...
3
votes
0answers
346 views

Negative binomial model vs zero-inflated negative binomial - theoretical justifications

I have a count variable that I would like to predict using a categorical variable (it has 4 levels). I would like to decide whether I should use Poisson, negative binomial, or zero-inflated negative ...
3
votes
0answers
130 views

About Partial dependence for Poisson GLM

Can someone tell me what would be the expression for calculating the partial dependence on a GLM model with family specified as Poisson? From applying Friedman partial dependence estimation ...
3
votes
0answers
183 views

Log-normal vs. log-linear vs. logging the response variable

I've been reading a lot of Wikipedia pages and StackExchange/CrossValidated posts, and I have come to a point where I realize I do not understand some of the terminology I have been using. What's ...