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
1 vote
0 answers
39 views

"Percent change" interpretation when we $\log$ the expected value instead of taking the expected value of the $\log?$

When we take the log of the $y$ variable of a regression and then fit the OLS estimator via $(X^TX)^{-1}X^T\log(y)$, we can interpret the regression in terms of percent change in $y$. However, this ...
  • 35.8k
1 vote
1 answer
17 views

Comparing $R^2$ between Gaussian GLM with identity link and with $\log$ link

It is known that $R^2$ should not be compared between two regressions where one uses features $X_1,\dots ,X_n$ to predict $Y$ and the other uses those same features to predict $\log(Y)$. However, this ...
  • 35.8k
0 votes
0 answers
12 views

Difference between odds and odds ratio? Interpreting logistic regression coefficients [duplicate]

I was wondering what the difference is between odds and odds ratio in logistic regression. I understand that formally, odds is the probability of success over the probability of failure, however, I ...
1 vote
0 answers
15 views

statsmodels GAM: how to efficiently fit multiple models with identical exog but different endog variables [closed]

I want to fit multiple (several hundred or thousand) generalized additive models using the statsmodels package. I have different response variables $Y_1,...,Y_n$, each of which i want to model with ...
1 vote
0 answers
17 views

Need some advice in selection of GAM model - choosing family, etc

I am not a statistician (clearly) and am trying to wrangle environmental data. My data looks like (note data is on time scale - 1 = Day 1, 650 = Day 30: I am developing a GAM model which predicts the ...
1 vote
1 answer
24 views

Zeros in Dependent Variable : Bad- Zeros in Independent Variables: Not Bad?

I am an MBA Student taking courses in statistics. We have been learning about regression models for count data. Recently, our professor has been talking about situations in which there are a lot of ...
2 votes
1 answer
67 views

Does this distribution belong to exponential family and does its support depend on $p?$

I have this bivariate distribution and I would like to tell if it is in the exponential family: $$f(y_{i},d_{i}|\theta_{1}\,\theta_{2}\,p)=\left(\left(\frac{1}{\theta_{1}}\right)\exp\left(\frac{-y_{i}}...
4 votes
3 answers
100 views

Is there a distribution for use with generalized linear models that captures both heavy tails and "pointiness" near the mean?

If I fit a regular linear mixed model to my data with lmer, I get a pattern of residuals that, at a glance, looks to me to deviate from Gaussian in two ways. The ...
  • 243
-1 votes
0 answers
13 views

Are the assumptions and implications for ordinary least squares listed relevant, comprehensive or too-relaxed for generalized linear models? [closed]

The following diagrams show which assumptions are required to get which implications in the finite and asymptotic scenarios. I have no idea whether GLMs share these assumptions or whether GLMs have ...
0 votes
0 answers
11 views

Reasoning about modelling uncertainty w.r.t input

I am trying to build up my reasoning about uncertainty modelling and ways of modelling it. What I am trying to essentially get at is how changes in input variables results in different posteriors(...
3 votes
1 answer
43 views

Generalized quantile regression? Transforming a conditional quantile like we transform conditional expected value

Linear models are models like $\mathbb E\left[Y\vert X\right]=X\beta$. Linear quantile regression models replace $\mathbb E\left[Y\vert X\right]$ with $Q_{\tau}\left(Y\vert X\right)$ for conditional ...
  • 35.8k
1 vote
0 answers
16 views

Do covariates correlated with residuals in generalized linear models make estimates not consistent or other problems? [closed]

Do covariates correlated with residuals in generalized linear models make estimates not consistent or make other problems? Economists raise an issue about endogenous variables in OLS and do some 2SLS ...
3 votes
1 answer
62 views

Logistic regression: What are use cases for logistic regressions where $n \neq 1$, i.e., $n >1$? [duplicate]

NOTE: This question relates to Binomial logistic regression. Thus, the $n$ in the title, refers to the parameter of the Binomial distribution. Most real-world use cases of logistic regression ...
2 votes
1 answer
31 views

Why does the logistic model for binary logistic regression return the probability that the outcome was in class/category 1?

In the context of simple binary logistic regression (https://en.wikipedia.org/wiki/Logistic_regression) we have $p(x)=\frac{1}{ 1 + e^{\beta x}}$, where $p(x)$ is interpreted as the probability that ...
2 votes
2 answers
34 views

GLM: how to treat multiple variables that all measure a confounding aspect in a slightly different way?

For a response variable $y$ and predictor $x_0$, I have data for a number of additional variables $x_n$, $n = 1, ..., 7$. I would like to control for a confounder in my GLM, let's call it "size&...
  • 121
1 vote
0 answers
29 views

gamma distribution GLMM with negative values

Following this post: If using Glmm with Gamma distribution do i need to transform my data to be between 0 and 1?, I would like to know what the concensus is regarding modelling a response variable ...
0 votes
1 answer
27 views

Probit/Logit or Linear regression Model?

I have data about the occurence of a data breach at certain companies for the periode 2005-2018. Now I have a question about the model I should use. I have two options: Probit/Logit: I set the ...
user avatar
3 votes
2 answers
135 views

Is there a Relationship Between Variance and Chi-Square?

I am an MBA Student that is taking courses in Statistics. Up until now, we had only encountered "Chi-Square" in the context of Contingency Tables. That is, how to find if the difference ...
1 vote
0 answers
18 views

Binomial regression model for low number of events?

Say I have a binomial model with response variable $Y = (Y_i)_{1 \le i \le M}$ which corresponds to the vector of number of successes for $D = (D_i)_{1 \le i \le M}$ the vector of number of events, ...
1 vote
1 answer
26 views

how to add offset for Poisson-GPR using GPML package? [closed]

I'm using the popular GPML package in MATLAB for both Poisson and NB regression. Is there any way to add offset as easily as glmfit()? Specifically, assume there are N obesrvations, I want $\log(\mu)=\...
  • 11
2 votes
3 answers
52 views

Why are the standardized residuals of a Poisson distributed random variable approximately normally distributed?

I'm currently reading through this GLM textbook, and have come across this assertion on page 24 that I can't quite wrap my head around The author claims if the expected value $\theta_i=E[Y_i]$ of ...
  • 21
0 votes
0 answers
9 views

Estimating Direct Effect with Conditional Models

I was recently considering the following: Suppose we have an experimental set-up where we have collected observations over thousands of locations (S) before and after treatment (T). Further, we have ...
1 vote
2 answers
249 views

Application of Maximum Likelihood estimation (MLE) to the step of Feasible Generalized Least Square (FGLS)

I have the following regression $$y = X\beta +u$$ where $y$ and $u$ are $(n\times 1)$ and $X$ is a fixed $(n \times k)$ matrix with full column rank and $\beta$ is an unknown $(k\times 1)$ vector of ...
  • 976
14 votes
2 answers
1k views

Why are "Linear" Models so Important?

I am an MBA student that is taking courses in statistics. Yesterday, I attended a statistics seminar in which some graduate students presented their research on some psychology experiments (e.g. ...
0 votes
0 answers
9 views

Detective work: Why dropping few rows makes R/glm.nb break down

I'm fitting a negative binomial glm to this dataset of 102 records (R code to reproduce below): ...
  • 3,245
1 vote
1 answer
39 views

Effect estimation after exact matching in MatchIt

I am performing exact matching on a set of continuous and categorical covariates. Once the matched (via MatchIt) is performed, I use logistic regression to estimate the effect of my treatment variable ...
1 vote
0 answers
21 views

Are Newey-West standard errors or robust procedures applicable to generalized linear models? [closed]

Are Newey-West standard errors applicable to generalized linear models? I do not mean GEE. I mean regular glm.
1 vote
1 answer
10 views

What test can I use to compare count data across groups?

I've conducted an experiment using seeds from several locations to test their viability. For each location, seeds were classed as viable or non-viable, giving me the total amount of viable and non-...
  • 13
2 votes
1 answer
49 views

Is a general linear model a "system" of linear regression models?

I was trying to understand the difference between a multiple linear regression model, a general linear model, and a generalized linear model. I have seen very similar questions have already been ...
0 votes
0 answers
19 views

Multiple factor comparisons for binary data

An example of my data is as follows: ...
1 vote
1 answer
39 views

Can we combine varying coefficients in GAM to get them as a whole?

I'm mainly interested in an estimation of smoothed yearly trend of rate of patients by a disease type. Currently I'm using model with varying coefficients in a form: ...
  • 289
0 votes
0 answers
14 views

Logistic regression for times series [duplicate]

Here is the context of my study: I have a patient in a coma, and which I follow over time (over several weeks hour by hour). This patient can have epileptic seizures every hour (Variable y = 1 if ...
1 vote
0 answers
7 views

Compound distribution regression vs random effect model

What is the difference between a regression model with a compound error distribution (e.g. negative binomial, beta binomial) and a binomial/poison GLM with a random intercept (say Gaussian)? Is it ...
1 vote
0 answers
39 views

Generalized Linear Model (GLM) in Python

Say that my data consists of time success failure exog 2009 3 1002 0.2 2010 2 1200 0.3 2011 9 1091 0.1 2012 0 1099 0.4 And I want to fit a GLM with a Binomial family and Logit link to this ...
  • 21
3 votes
1 answer
57 views

Can the Beta-regression be written in the GLM form?

The Beta distribution is: $$p(y)=\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}y^{\alpha-1}(1-y)^{\beta-1} $$ It's part of the exponential family. We can reparametrize this with using mean ...
1 vote
0 answers
25 views

Post-hoc test after GLM with binary data

This is my first time posting here so apologies in advance if I have done anything incorrectly. I have performed a binomial GLM and am now trying to perform a post-hoc test to see the significance of ...
0 votes
0 answers
22 views

Multinomial logistic regression for categorical data versus GLMER with proportional data?

I am struggling with my results and am questioning my choice of statistical method (multinomial logistic regression for categorial response variables or using glmer with proportions). I ran ...
0 votes
0 answers
12 views

What is the best way to model multiple phases of a time series when variables may have a different affect depending on phase?

Apologize if this is basic, I'm new to ecological modeling and it is not the focus of my work. I have a time series with observations of counts of a behavior. Within the time series there are clear ...
  • 1
1 vote
0 answers
10 views

How do I model relative time spend doing different behaviours?

I have a dataset comprising observations of ducks performing different behaviours. Specifically, ducks were observed for 1 minute each, and during each 1 minute observation the amount of time that ...
1 vote
1 answer
42 views

Manual calculation of McKelvey & Zavoina Pseudo $R^2.$

I would like to calculate McKelvey & Zavoina pseudo $R^2$ manually for poisson regression. I based my calculations on the formula found here i.e. $$ R^2 =\frac{\sigma^2(\hat y) }{\sigma^2(\hat y)+ ...
  • 432
0 votes
0 answers
13 views

How to model insurance count data with a large number of zeros and no number of claims in a period greater than 1

I have a large dataset for insurance claims and I am trying to model both the number of claims and the severity of claims based on a number of explanatory variables using a General Linear model. As is ...
3 votes
2 answers
204 views

Why null deviance is different from my manual calculations?

Let's consider this very simple example with Poisson regression: ...
  • 193
1 vote
0 answers
15 views

Geometric Interpretation of GLS with endowment of new norm

I was reading a very short passage about GLS (Generalized Least Squares Regression) provided with insufficient reference. I understand the derivation process of the BLUE $\hat{\beta_G} = (X^TV^{-1}X)^{...
0 votes
0 answers
10 views

How to evaluate the performance of batch correction within multiple samples?

NOTE: THIS QUESTION WAS ORIGINALLY POSTED HERE Hi! I am performing the validation of various targets across multiple cohorts. In short, we found some interesting targets in our own sample group, and ...
  • 21
3 votes
0 answers
31 views

GLMM and BLUPs: high correlation between random effects in a logistic GLMM

Background: In an experiment, subjects had to choose whether they wanted an immediate reward or to wait for a larger reward (dichotomous dependent variable: yes/no). This choice was made multiple ...
1 vote
0 answers
26 views

How to interpret coefficents when you have an offset?

I'm measuring counts of birds as a function of the time (in months) across three parks (NP), as well as the presence of carcasses and season. I'm trying to find out whether the population is ...
  • 93
1 vote
1 answer
31 views

How to compare variance explained in two regression models?

Let's say I have a measurement of height of 200 individuals as $y_1$ and fit a simple linear regression model as: $y_1 = x_1 + x_2 + \epsilon_1$ where $x_1$ and $x_2$ are some subject metadata I ...
  • 231
1 vote
0 answers
38 views

Does a Heteroskedasticity and Autocorrelation Consistent Estimator for generalized linear (mixed/non-mixed) models exist?

Does a Heteroskedasticity and Autocorrelation Consistent Estimator for generalized linear models exist? That would make GEEs outdated unless no-free lunch theorem suggests otherwise. I am only aware ...
1 vote
2 answers
45 views

Confidence interval for the difference of two negative binomial rates

I have a model with a negative binomial distribution using the glm.nb function from R: ...
4 votes
1 answer
92 views

Analysis of proportions in repeated experiments

What would be the best solutions to analyse proportions of multiple classes. The classes are mutually exclusive, with each observation falling into one of the classes (i.e. no other class is possible) ...
  • 4,299

1
2 3 4 5
83