Skip to main content

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

Intercept estimates VERY different comparing glm and glmm

Can anyone explain the following puzzling phenomenon? I'm fitting a binomial glmm using glmer from the lme4 package of R. The mean of the binary response variable in the dataset is about 0.1. When I ...
Andrew Robinson's user avatar
0 votes
0 answers
13 views

How to choose default uninformative prior in the R Package BAS

I'm conducting a Bayesian multilevel logistic regression based on the Rpackage BAS. I'm a beginner in Bayesian statistics. But in bas.glm, I don't understand and I don't know how to specify my prior. ...
KB02's user avatar
  • 1
3 votes
1 answer
115 views

Validity of AIC When Comparing Models with Varying Dispersion Parameters

I'm currently making a binomial model with a logit link, which is parameterised as a quasibinomial since I'm allowing it to calculate the dispersion parameter. I was wondering, since changes to the ...
Daniel's user avatar
  • 33
1 vote
1 answer
36 views

Modelling spatial autocorrelation with GAMs

the topic of spatial autocorrelation (SA) within the context of generalized additive models has already been discussed in several posts within this forum, see e.g. Why does including latitude and ...
August Edwards's user avatar
7 votes
2 answers
282 views

How much dispersion is too much for quasipoisson regression?

Quasipoisson regression goes beyond standard poisson regression in taking into account overdispersion (whereby the dependent variable's variance is much greater than its mean). This is explained at ...
rolando2's user avatar
  • 12.8k
0 votes
0 answers
28 views

Comparing Gaussian GLMM models for positive, slightly non-normal data: Interpreting conflicting model selection criteria

I'm analyzing data using glmmTMB in R with the following model structure: ...
Julius Bogomolovas's user avatar
2 votes
1 answer
23 views

What is the best test to run to compare presence/absence of something between sampling locations?

I have data on the presence/absence of four different pathogens found in edible crabs in 7 locations over 2 seasons. For this study, 30 crabs were collected from each site and for each crab the ...
Kiran Bhandari's user avatar
0 votes
0 answers
25 views

How to choose a feature as an offset in GLM Binary Regression

Is there any statistical test to determine that Feature A should be an offset instead of Feature B and Feature C. From what I understand, if in insurance modelling, usually, offset has a connection ...
actsci stud tries2learn math's user avatar
2 votes
1 answer
31 views

GLM for longitudinal or time-series -- how to model and interpret a binary logistic regression over time controlling for covariates using R

I work with the risk of delays (0 = no risk, 1 = risk). I want to run a binary logistic regression considering panel data over time. I have data from 4 years (4 time-points) and some covariates (...
Luis's user avatar
  • 163
0 votes
0 answers
7 views

Calculate HC3 robust vcov matrix when knowing only of Gradient and Hessian matrices of a GLM model

Suppose that a Generalized Linear Model is fitted using Maximum-Likelihood Estimation, but we only have access to two results from it: the gradient matrix $G$ is a $n \times p$ matrix where each row $...
Parlare's user avatar
1 vote
1 answer
28 views

Lagged Dependent Variable in Bayesian Linear Regression

I'm constructing a Bayesian General Linear model to try to model the number of customers a business has. Essentially Market Mix Modelling. I believe the number of customers to be explained by the ...
TNoms's user avatar
  • 95
3 votes
1 answer
39 views

How to analyze this data in R, where there is no clear distinction of the response variable and the predictor variable? [closed]

Is there a statistician out there who knows how to analyze psychology surveys? Due to the way my response variable is structured in my data frame, I'm struggling to analyze it in R. Please, I ...
user avatar
0 votes
0 answers
35 views

GLMM for not so gaussian data

I am having an issue with GLMM and hope you could advice me. So basically I have data from microscopy experiment of three independent groups (variable: subfolder) nested within 4 experimental ...
Julius Bogomolovas's user avatar
1 vote
1 answer
34 views

Linear models to compare SNP categories between patients

I have 8 patients (GROUP: 3 healthy, 5 disease). For each patient, I determined single nucleotide polymorphisms (SNPs) and annotated the effect of the SNPs (EFFECT_CATEGORY). Each SNP (~3000 per ...
BackFish's user avatar
1 vote
0 answers
20 views

Testing the difference between two Root Mean Square Error values for statistical significance [duplicate]

I would like to compare the predictive power of 2 models. The models are meant to model count data and respective probabilities. I am using two metrics as means of comparison: Root Mean Square Error ...
Astral's user avatar
  • 133
0 votes
0 answers
31 views

How to interpret my GLM results [closed]

I'm running a GLM to see if there are any differences in % cover of fescue and native grasses along a bison use intensity gradient (Do we have more fescue or more native grasses where there are more ...
user417834's user avatar
0 votes
1 answer
45 views

why does LASSO regression return unstandardized coefficients [closed]

I have more general questions that does not refer to a coding issue. Why does LASSO regression require standardization of the predictors but return unstandardized coefficients (glmnet function - https:...
Simon's user avatar
  • 1
0 votes
1 answer
37 views

How to approach GLMs using data with beta distribution in R?

I'm trying to run some models on bee presence with five predictor variables. A snippet of the data is attached, but essentially I measured floral abundance and richness, calculated floral evenness and ...
alexia m's user avatar
1 vote
0 answers
26 views

What are the degress of freedom in the summary output for GLMs in R?

I am currently self-studying GLMs with the book "Generalized Additive Models An Introduction with R" and I am a bit confused regarding the degrees of freedom in the summary output for GLMs ...
Dude3400's user avatar
0 votes
0 answers
39 views

Questions regarding the definition of the deviance in the context of GLMs

I've been self-studying GLMs and I have some questions regarding the deviance in the context of GLMs. In Generalized Additive Models An Introduction with R, the author defines the deviance of a model ...
Dude3400's user avatar
1 vote
0 answers
26 views

Modeling trend in binary variable over time

I have a dataset with repeated measures per subject, with 100 subjects. My outcome of interest is a binary variable assessed on an hourly basis, of if the subject met a threshold value through a test. ...
BeardedWisdom's user avatar
0 votes
0 answers
21 views

Comparing performance of probabilistic regression models - how to adapt Brier score?

Suppose I have two predictions models, Model 1 and Model 2. I have a dataset containing observations, features and actual outcomes. For each observation, the “outcomes” (i.e. predictions) that the ...
Alex's user avatar
  • 101
1 vote
1 answer
63 views

Relating animal sightings with land cover - poisson, negative binomial, zero inflated and then LOST

I have a number of sightings of animals in a location (an island). The sightings are opportunistic (corpses people stumble upon) and happen in different land covers. I am supposed to investigate if ...
Miren Sanov's user avatar
1 vote
0 answers
15 views

log ratio transformation on data and GLM testing on 4-way olfactometry results

I recently completed an experiment looking at 40 individual aphids movement over 20 minutes inside a 4-arm olfactometer with 3 controls (no scent, uninfected aphids, agar) and aphids infected with the ...
A-okay's user avatar
  • 83
0 votes
0 answers
21 views

Which is the correct regression model for predicting the association of climate with Julian days nested within decades?

Below is a reproducible example: ...
Rahul's user avatar
  • 23
0 votes
0 answers
29 views

How to derive GEE from GLM?

I am now reading the lecture note from: https://dept.stat.lsa.umich.edu/~kshedden/Courses/Regression_Notes/gee.pdf Why do we have $V_{i}^{-1}(y_{i}-\mu_{i})$? I cannot link the last equation on page ...
doraemon's user avatar
  • 250
0 votes
0 answers
31 views

GLM Multiple Comparisons

I am performing several Generalized Linear Models in my analysis and I am wondering which method to use for adjusting p-values due to multiple comparisons. I have 4 outcomes (judgement of intensity ...
KayAnn's user avatar
  • 11
0 votes
0 answers
41 views

How to report ANOVA results when comparing to negative binomial models?

I want to report the results of an ANOVA test used to compare two negative binomial models in R: anova(model1, model2, test = "Chi") I receive the ...
user avatar
0 votes
1 answer
52 views

Multiple regression with two continuous predictor variables with R

I'm trying to find a suitable multiple model (with two continuous predictor variables) for my data and I'm not sure if a linear model with lm() would be sufficient ...
Mogens's user avatar
  • 1
1 vote
0 answers
22 views

Calculate weight for GLM-quasi poisson model

I am running several models with the quasi-Poisson family. I am looking at data from vulture restaurants. Vulture count was modelled at each site as a function of either a linear or quadratic effect ...
Emeline AUDA's user avatar
2 votes
1 answer
51 views

Difference between regression methods

When to use logistic regression and when to use beta regression in statistical modeling for given data? How do know the difference between them? And when can I fit just a linear regression and not ...
Anju's user avatar
  • 21
0 votes
0 answers
18 views

Finding the best way for combining features non-linearly within a linear regression

Problem Statement I have a set of two features, $X_1$ and $X_2$ that I combine to try and predict a target variable in a regression of the form: $ Y_0 = \frac{X_1 - X_2}{X_1 + X_2} $. You can think of ...
Joe's user avatar
  • 271
1 vote
0 answers
50 views

What is the motivation for the use of $n-m$ in the method of moments in Wedderburn 1974?

In an answer to this question Is there a Relationship Between Variance and Chi-Square? I wrote So to find the dispersion parameter, one has to use a different trick. In Wedderburn 1974 this is done ...
Sextus Empiricus's user avatar
3 votes
1 answer
21 views

Incorporate retest reliability into model (in R)

I'm conducting a study to evaluate the impact of an intervention on a test outcome. Each participant takes the test before and after the intervention. Also there's a control group involved. Given that ...
Jailbone's user avatar
1 vote
1 answer
51 views

How to compare cases and controls after adjusting for age differences?

I have a dataset in which I have different measures (a, b, c) and two independent variables: D which is an independent binary variable representing cases (1) and controls (0), and age is another ...
elven's user avatar
  • 11
1 vote
0 answers
19 views

How do you visualise the conditional esperance of your outcome variable depending on the predictor?

I've read several posts regarding the choice of distributions and link functions for GLMs. Although I'm far from understanding it all, what I've gathered is that the purpose of the link function is to ...
Boussens-Dumon Grégoire's user avatar
1 vote
1 answer
30 views

Difficulty simulating prediction interval for quasipoisson GLM in R

I fit a quasi-poisson model (with pretty severe over-dispersion, as I understand it) summarized here: I'd now like to obtain fitted values and 95% prediction intervals. After some searching, I came ...
josephfsexton's user avatar
6 votes
2 answers
624 views

Simpson's paradox: How interpret results?

I am building GLMs to investigate the effect of environmental variables on frog occupancy and abundance (negative binomial). I am having an issue of reversal of estimates which, from what I found on ...
Marco Lassandro's user avatar
6 votes
3 answers
280 views

dispersion of a negative binomial model

In R's, glm.nb summary, it says dispersion parameter $\phi$ is set to 1. When the model is $Y \sim \text{Negbin}(\mu,\theta)$ where $E(Y)=\mu$ and $V(Y)=\mu+\mu^2/\...
quibble's user avatar
  • 1,694
1 vote
0 answers
64 views

Cumulative Residual Plots for GLM Goodness-of-Fit Tests

I wanted to ask about the cumulative residuals (CURE) plots for testing the goodness of fit test for negative binomial regression. CURE plot has been a standard in traffic crash frequency modeling for ...
Barton's user avatar
  • 31
0 votes
0 answers
13 views

Comparing GLMs with different fitted distributions

I have a scenario where I need to compare some generalized liner models (with same link function, target variable, but not necessarily nested) with k fold cross validation, using a cost function to ...
user101874's user avatar
0 votes
0 answers
17 views

Diagnostic for GLM Gamma model in R

I am applying a glm model with gamma distribution and log link function to a continuous variable defined only on R+. I have tried to fit the model but I am having some difficulty interpreting the ...
GiulioSurya's user avatar
4 votes
1 answer
57 views

Likelihood-ratio and score tests of a (non)linear combination of coefficients

The likelihood-ratio and score test are typically used for simple scalar hypotheses such as $\beta_1 = 0$ or $\beta_1 = \beta_2 = 0$. How can we test a linear combination of coefficients using the ...
DrJerryTAO's user avatar
  • 1,824
2 votes
2 answers
71 views

Why GLM fit is different from direct fit using logistic function [closed]

I found in my data that a direct fit using the logistic function gives a different and better (R^2) fit than GLM fit using binomial distribution with logit link function. I was naively expecting the ...
santelus's user avatar
0 votes
0 answers
27 views

Difference between an ANCOVA and an ANOVA on residuals that the effects of covariates are already removed

My psychological experiment has a repeated-measures design. Each participant performed 4 conditions (Factor A [2 levels] X Factor B [2 levels]). Let say the DV is the accuracy of the participants and ...
Kelvin's user avatar
  • 1
0 votes
0 answers
14 views

mixing predictions and observations via a Credibility approach

Assume I have $p$ groups and want to predict a value $y$ based on the information from which group the observation was. Let $y$ be the continuous response variable centered around $0$ and $X_1$,...,$...
Barkas's user avatar
  • 203
0 votes
0 answers
31 views

Meaning/Definition of Smoothing

I am self-studying Vector Generalized Linear/Additive Models (mostly) via Yee, T. W. (2015) "Vector Generalized Linear and Additive Models: With an Implementation in R." This book has many ...
TJM's user avatar
  • 153
1 vote
1 answer
48 views

Need help interpreting interaction effects

I have two categorical independent variables (Category: Before/After and Treatment [A,B,C]) and a binary response. My regression output in R is as follows: ...
Elemen00's user avatar
0 votes
0 answers
46 views

Are GLM response residuals supposed to be centered on 0?

I'm struggling with the idea of residuals and error terms in GLMs. I've gathered that there are no explicit error terms in GLMs because the distributions modelled don't allow the decomposition between ...
Boussens-Dumon Grégoire's user avatar
10 votes
5 answers
1k views

Why GLM don't have an error term and why shouldn't residuals be i.i.d?

I've read dozens on post on the subject but I cannot figure this out. From what I've gathered, GLMS don't include an error term in their formulation unlike linear models (LM). I was wondering why (or ...
Boussens-Dumon Grégoire's user avatar

1
2 3 4 5
94