Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Gamma distribution glm standardisation

I want to model biomarkers which seem to have two distributions. I want to model the change in biomarker at two visits three years apart. However, I am trying to do this with a glm and a gamma ...
Steph's user avatar
  • 1
0 votes
0 answers
44 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
229 views

In a GLM model with a gamma log link, how to interpret a negative coefficent of a dummy variable with a continuous response?

I am a little confused with how to interpret a negative coefficient in a GLM model using the Gamma family with a log link. My response variable is continuous (with no zeros) and right skewed and ...
user3334472's user avatar
6 votes
1 answer
161 views

Why is the canonical link of a GLM with Gamma distribution the reciprocal?

I'm fitting a generalized linear model to a theoretically gamma-distributed dataset, and I'm confused about the canonical link. The gamma distribution has PDF $$ f(y;a,\lambda) = \frac{\lambda^a e^{-\...
Jack Guan's user avatar
  • 103
1 vote
2 answers
132 views

How to find the appropriate family for a GLM

I have behavioural data on gentoo penguins from when we did research in Antarctica. I am looking at vigilance on exterior and interior nests at two different locations. To standardise the count of ...
Alice's user avatar
  • 11
1 vote
0 answers
22 views

Evaluating GLM with Gamma distribution vs. transformed response for predicting right-skewed price data

I am trying to predict house prices using a dataset with the following variables: ...
John Smith's user avatar
0 votes
0 answers
31 views

Interpreting R glm gamma output with interacting categorical predictors

I have a set of different gamma regressions that I ranked with AIC (with help from kind folks on CV) that show the effects of year (2019 and 2021) on "value" (an area), but I am struggling ...
ElizaBeso000's user avatar
0 votes
0 answers
58 views

Equivalent to likelihood ratio test for null and fitted generalized linear model (Gamma) in R?

I have a dataset of ellipses and I am trying to perform regressions with different categorical variables to see what influences different ellipse parameters the most. As was suggested in the answer to ...
ElizaBeso000's user avatar
1 vote
1 answer
274 views

How do I use something like predict.glm (in R) with a svyglm model and why don't my predictions match my data?

I'd like to estimate "cost" using some covariates with a weighted gamma model using svyglm. The weights sum to 1, and there are about 10,000 rows in the dataframe df total, with columns ...
Mark's user avatar
  • 202
1 vote
1 answer
88 views

In a GLM, how do the dimensions of the linear predictor and the range of the link function always align?

Let $\mathbf{\vec y}$ be the response vector. Then, we can write the exponential family as : $$ \large p(y;\boldsymbol{\eta})=h(y) \exp \left(\boldsymbol{\eta} \cdot \mathbf{T}(y)-A(\boldsymbol{\eta})\...
Sagnik Taraphdar's user avatar
0 votes
0 answers
76 views

Interpreting and transforming GLM output parameters with a Gamma log link

I built a GLM model in R with a Gamma log link and where my response variable is "1 - effectiveness". I would like to report the results of my model directly in terms of "effectiveness&...
Javier Fajardo's user avatar
5 votes
1 answer
672 views

How to interpret the coefficients of Tweedie GLM with log link?

I'm trying to model cost data which have 0s. It seems that gamma is not an appropriate distribution and zero inflated gamma seems to be a bit of an overkill, but Tweedie seems to be appropriate with ...
user395714's user avatar
1 vote
0 answers
67 views

How borked is my attempted notation for a multilevel gamma regression with AR(1) autocorrelated residuals?

I have no math background and am in way over my head trying to figure out the correct notation for my model: a multilevel random-slopes gamma regression with log link and AR(1) autocorrelated ...
Nick Ballou's user avatar
1 vote
0 answers
68 views

Interpreting results of GLM with gamma regression in R

I am fairly new to R and multiple regression analyses so I could use some help interpreting my results. For my research I am trying to find predictors for the amount of blood loss during surgery. For ...
Robert-Jan Pierik's user avatar
6 votes
1 answer
401 views

How to simulate data for a Gamma glm?

I am wondering about whether there might actually be different ways to simulate data for say a Gamma GLM, which in turn relates to what might be the parametrization that the ...
Tiago Marques's user avatar
1 vote
0 answers
83 views

Understanding LOO / WAIC for Bayesian models selection

I'm trying to select between two models. 1. has a Truncated Normal likelihood and 2. has a Gamma likelihood. 1. has a much higher WAIC/LOO score but the posterior predictive in 2. (specifically the ...
chesslad's user avatar
  • 211
0 votes
0 answers
72 views

Finding appropriate parameters for Gamma when bootstrapping a GLM

I'll illustrate what I want to do with a Poisson GLM first. I have a GLM with only factor co-variates, thus, to bootstrap this GLM what I can do is e.g. take a single random observation without the ...
AyamGorengPedes's user avatar
0 votes
0 answers
84 views

GLM: Differing results for Interaction Effects depending on the link-function

I want to test whether whether a dispositional risk factors moderates the relation between a situational risk factor and a negative outcome in a regression model (including several control variables). ...
induktivist's user avatar
1 vote
0 answers
61 views

Appropriateness of Tweedie GLM for modeling average daily driving distance with unknown numerator and denominator

I have a dataset of cars and want to model a variable called average daily driving distance. The variable was calculated before I received the dataset as: average daily driving distance = total ...
Chebyshev's user avatar
4 votes
1 answer
1k views

Is unit deviance (statistics) equivalent to the loss function (machine learning)

In this page from scikit learn, about GLM, the notion of unit deviance is introduced as loss function (from the machine learning perspective). I want to know if there is equivalence between these two ...
John Smith's user avatar
1 vote
1 answer
96 views

GLM with Gamma(link = "log") in R

I have the output (shown below) from the GLM with Gamma(link = "log"). The outcome (dependent variable) is strictly greater than 0, and the group variable (predictor) is binary (either 0 or ...
KLee's user avatar
  • 375
2 votes
1 answer
61 views

GLM on continuous variable not showing 100% A/E

I am fitting a gamma GLM on insurance claims predicting severity. Using log( claim count) as offset and ultimate claim amount as target variable and a gamma error structure. Model converges but Actual ...
user3807808's user avatar
1 vote
1 answer
78 views

Issue with the mathematical equation of a Gamma glm with a random intercept

I wanted to write the mathematical equation for my model below. It is a glm that tries to explain the relationship between the sum of observed biomass of several replicas at different observation ...
Florian B.'s user avatar
3 votes
1 answer
2k views

Gamma Regressor - Some value(s) of y are out of the valid range of the loss 'HalfGammaLoss'

I am trying to use GammaRegressor to predict the customer revenue in the next 3 months, 6 months etc. So, I tried using the GammaRegressor based on suggestions from ...
The Great's user avatar
  • 3,342
0 votes
0 answers
19 views

How should I interpret the random variables in this histogram?

I'm currently trying to eyeball the type of distribution of this histogram to properly specify the family of distribution to use for a generalised linear model in python. I'm pretty sure it's a gamma ...
ADAMS zequi's user avatar
0 votes
0 answers
169 views

In R : translate GLMM models into mathematical notation (using Gamma family and log)

I have those two following generalized linear mixed models. The object Sbiomass is modeled as the sum of biomass in several replicas. The objects x1 and x3 are discrete variables, x1 is a continuous ...
Florian B.'s user avatar
4 votes
2 answers
1k views

GLM or beta regression, with proportion data, and many 0 and 1

I am trying to see if some anthropic variables (e.g., PopdensityAvg) explain animals' distribution. My dependent variable is the area occupied (...
LT17's user avatar
  • 161
0 votes
0 answers
47 views

Random effects in Generalized Linear Mixed Models / alternative with Generalized Linear Models

I am trying to see if some anthropic variables (e.g., Population density, Population growth, and Roads) explain animals' distribution. My dependent variable is the percentage of area occupied (...
LT17's user avatar
  • 161
1 vote
1 answer
343 views

What does Exp(B) mean in generalized linear model (GLM) with gamma distribution?

What's the difference between B and Exp(B) in GLM? And is it more correct to replace B with β? I don't need an extremely detailed answer about the theory behind it.
Sarah's user avatar
  • 11
4 votes
2 answers
2k views

Using GLM: Gaussian, Poisson vs Gamma

I am trying to perform a GLM analaysis using R for an outcome that is: Bounded by 0 - 10 In steps of 1 (Numerical Rating Scale for Pain: 0 - 10) I have a set of demographic factors, age, sex etc, ...
ssciberras's user avatar
6 votes
3 answers
4k views

Predicting with a GLM

I wanted to check my understanding of predicting with a GLM: A binomial/logistic regression model predicts the binomial parameter = p = P(success). To convert the probability into classes, we have to ...
mapleleaf's user avatar
  • 275
2 votes
1 answer
683 views

Performing post-hoc tests on a GLM with Gamma distribution

I am analyzing data that is gamma distributed. Hence, an ANVOA was a good choice but a GLM with gamma distribution worked well. To report the data I want to compare all groups to the control treatment ...
Tobias's user avatar
  • 23
1 vote
1 answer
3k views

Model residual diagnostics of gamma GLMM with log-link

I am trying to model fish length data (N > 115.000) which are highly right-skewed using linear mixed effects models. Actually all data make sense and the the extreme high values are valid ...
Johannes's user avatar
  • 155
2 votes
1 answer
2k views

How to evaluate a Gamma GLM fit and appropriateness for the data?

I am trying to predict the time (in seconds) a process would take based on the computer's disk throughput (measured by dd and reported in MiB/s) and the amount of ...
Xavier Merino's user avatar
3 votes
1 answer
1k views

R: Gamma GLM assumption testing

Can I still run a gamma GLM in R if my data does not pass the equal variance assumption through the Levene Test? Is there a nonparametric test I should run instead or can I just run the gamma GLM?
user avatar
4 votes
0 answers
335 views

Variance of a gamma distribution being proportional to its mean - a vacuously true statement?

I used to believe that the negative binomial distribution (for count data) and Gamma distribution (for continuous data) shared the property that the variance can take arbitrary values regardless of ...
Arnaud Mortier's user avatar
1 vote
0 answers
63 views

95% confidence intervals crossing 0 but p < 0.05 in glm gamma family

As title suggest: Is it possible to have confidence intervals crossing 0 but p = 0.042? This happened to me in glm model with gamma family and link identity. The conf. intervals were generated by tidy ...
David Janda's user avatar
1 vote
0 answers
162 views

Testing whether means of several gamma distributions are equal?

I have conducted measurements on bubble sizes on 20 positions in the same foam, each of the 20 positions following a gamma distribution. From the boxplot the mean values appear very similar... Now I ...
Iben Hansen's user avatar
4 votes
1 answer
831 views

Help understanding parameterization of gamma distribution in R's glm()

I would like recover the gamma distribution parameters from a model fit in R using glm(..., family = Gamma). The first step is trying to figure out which ...
filups21's user avatar
  • 395
2 votes
1 answer
1k views

Predictions from hurdle models in R

I am using hurdle models to predict a continuous cost variable that has many exact zeros. I have fitted a hurdle model with a binomial component and a gamma component, but when I am trying to combine ...
Kellan Baker's user avatar
1 vote
1 answer
6k views

Statsmodels: how to run and interpret a Gamma regression?

I have an endogenous variable that is continuous and non-negative. From what I can gather, a Poisson regression is not appropriate because the values of the response variable are not natural number, ...
Matias Faure's user avatar
0 votes
1 answer
1k views

Term for exp(beta) from a Gamma-GLM

I have read a lot about interpretation of coefficients from Gamma-GLMs (using a log-link function), e. g. from this thread How to interpret parameters in GLM with family=Gamma , and found this to be ...
user208029's user avatar
1 vote
1 answer
4k views

Interpreting results from Generalized Linear Model, gamma family, log-link

I have a small number of observation point, and the data is continuous and very skewed. I decided to analyze the data with Generalized Linear Model, gamma family, log-link. I'm having hard time ...
Ecobase's user avatar
  • 11
3 votes
1 answer
617 views

How to specify Gamma parameterizations in a generalized linear model setting

I am trying to model an outcome using a generalized linear model and the Gamma distribution with a log link function using the glm() function in R. I went to ...
Stefan's user avatar
  • 6,551
4 votes
1 answer
4k views

Gamma GLM: why log-link is more common than canonical link

"The canonical link of Gamma GLM is $g(x)=1/x$ is often not very practical. Log-link is more appropriated in most cases." One reason I can think of is that log-link makes sure $\mu$, the ...
WCMC's user avatar
  • 1,058
2 votes
0 answers
821 views

Gamma Regression as the Last Layer of the Neural Network

My current task involves predicting data that follows a Gamma distribution. To avoid confusion of notations, in the following discussion, the p.d.f will be $$\mathbb{P}(y|\alpha, \beta)=\frac{\beta^\...
Haochen Sun's user avatar
0 votes
0 answers
1k views

Use gamma distribution or log-transform with OLS?

I have blood levels of a chemical as the response or dependent variable. The minimum can be 0 and it has distribution as shown in figure below: I believe this is a gamma distribution. I have to ...
rnso's user avatar
  • 10.2k
2 votes
0 answers
146 views

GLMs with skewed distributions - why use mean and not mode?

There's something that's a bit troubling for me. The unit deviance in GLM is defined as $2[t(y,y) - t(y,\mu)]$, when $t(y,\mu) = y\theta(\mu) - b(\theta(\mu))$ (theta being the natural parameter). For ...
Maverick Meerkat's user avatar
2 votes
1 answer
597 views

Robust SE clustered GLM Gamma Log Link to match GEE Robust SE

How do I get the robust standard errors/sandwich variance estimators for GLM using a Gamma family with a log-link to match the robust standard errors from the GEE output? ...
renethestudent's user avatar
7 votes
1 answer
7k views

Deviance for Gamma GLM

I was wondering why the Gamma deviance formula is given as: $$2 \sum [ -log(\frac{y_i}{\mu_i}) + \frac{y_i-\mu_i}{\mu_i} ] $$ Shouldn't the 2nd term become zero after the summation is conducted?
Maverick Meerkat's user avatar