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

4,658 questions
Filter by
Sorted by
Tagged with
35 views
+50

### Model has higher (and closer to 1) $\beta$, but similar $R^2$ and correlation

I have model one which produces prediction $\hat{y_1}$, later I came up with a new model which produces prediction $\hat{y_2}$. I have ground truth $y$. The models are not regression based but they ...
1 vote
1k views

### Steps to conduct ANCOVA between two groups that has 2 covariate?

Using R, I want to compare two groups (1 & 2), each group having two covariate. More specifically, i need to: Within each group, test for significant relationships between the dependent variable (...
2k 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),...
19 views

### Using the glm.nb() R package [closed]

I want to fit the negative binomial data using the glm.nb() function. For some reason, I already had the ground truth dispersion parameter of the negative binomial distribution, so I would only have ...
1 vote
22 views

### Is it necessary to transform the tide variable using a truncated Fourier series for GLM (Gamma), and how should I interpret interactions? [closed]

I’m using glm to see whether there is an association between zooplankton biomass (response) with two variables: 1) hours from high tide (high tide is zero, hours before are negative at one hourly ...
31k views

### Why is the square root transformation recommended for count data?

It is often recommended to take the square root when you have count data. (For some examples on CV, see @HarveyMotulsky's answer here, or @whuber's answer here.) On the other hand, when fitting a ...
1 vote
54 views

### Compare effects in a small sample

I would like to analyse whether measures A, B, and C have a different influence on a measure D compared to a measure X on D. My exploratory hypothesis is that A, B, or C could influence Z negatively ...
1 vote
403 views

### Incorporate Weights/Offsets with Nonparametric Models

I am modeling pure premium in R. I have read that pure premiums are usually modeled using a Tweedie distribution (glm). There is generally an offset or weight added to the model, such as an exposure. ...
1k views

### AIC of a two-part/hurdle model?

I have continuous data with a point mass at zero, so my plan is to use a two-part model where I first model whether an observation is zero or non-zero in a logistic regression and then model the ...
605 views

### What is a GAM; question about sklearn's SplineTransformer

From my understanding, using basis-spline feature expansion/transformation with fixed parameters (number and placement of knots, etc.), then feeding that into a linear/logistic regression is ...
1 vote
267 views

### Regression model with (almost) non-negative residuals

I would like to fit a regression model with continuous response and predictors. A fraction of the response is a non-negative linear combination of several predictors. What is not covered by this ...
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 ...
286 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 ...
1 vote
347 views

### Simulated data (with the outcome and predictors) from a GLM model

The goal of simulation is to produce a number of synthetic datasets, where the outcomes are a function of the known regression coefficients. I would like to know if my reasoning behind creating ...
1 vote
35 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 ...
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. ...
41 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 ...
116 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 ...
366 views

### Why does my Poisson regression fail? I'm using the R command glm(), x and y are non-negative integers, I'm using a linear link

I'm trying to regress one set of hurricane numbers per year onto another, as a way to estimate the proportion of the hurricanes that hit the US, and the uncertainty around that proportion, all in the ...
31 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: ...
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 ...
24 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 ...
1 vote
549 views

### Retrieving standard deviation from glm and glmer

For my thesis I've conducted several GLM's and GLMM's. Now for my report I need standard deviation values, however the summary tables of my models only produce Std error values. ...
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 ...
616 views

### Improving fit of underdispered beta regression model in glmmtmb

I have survey data where the outcome is the proportion of a research budget interviewees wished to assign to one of three different "types" of research into solutions for various issues. I ...
32 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 (...
8 views

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 ...
1 vote
1k views

### Generalised linear models (for dummies)

I'm trying to get to grips with this topic, and it's proving tough. Could anyone point me in the direction of some good web based sources to read? I'm looking for good explanations of the theory and ...
2k views

### How do I get a positive intercept using linear regression with logarithms?

I'm trying to change negative values to positive from my linear model. Here is my attempt: ...
1 vote
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 ...
46 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:...
3k views

### Why do we make a big fuss about using Fisher scoring when we fit a GLM?

I'm curious about why we treat fitting GLMS as though they were some special optimization problem. Are they? It seems to me that they're just maximum likelihood, and that we write down the ...
1 vote
226 views

### Comparing average success rates of varying sample sizes

I have the following data frame: ...