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

3,680 questions
Filter by
Sorted by
Tagged with
0answers
6 views

### How do I add an interaction term to MANOVA in R?

I would like to compute Pillai's Trace from multivariate analyses in R on an interaction term. A subset of my data is: ...
1answer
19 views

### Remove Interaction term with Factor values in R

I have following model: ...
0answers
9 views

### Convert bayesian model to Mixed-Effects Models (lme4)

I am studying some Score in a population of young (Age=1) and old people (Age=2). Each person was studied several times (1-4). ...
0answers
21 views

### How to model exponential time decay component with linear regression?

I was wondering if there was a way to run a regression on a formula that is not exactly a straightforward $Y=\beta X + \varepsilon$ Essentially what I have is a bunch of features $x_i$, with an ...
0answers
7 views

### How would you transform a percentage dependent variable to fit a logistic regression? [duplicate]

I have a outcome variable that is a percentage (proportion). According to this, I should probably use a logistic regression: What are the issues with using percentage outcome in linear regression? My ...
0answers
17 views

### What is the “empirical distribution” in the context of Bayesian inference?

A colleague of mine was using the functions bayesglm() and sim() from the arm-package in <...
0answers
24 views

### confidence intervals for mixed model with pronounced random effect unexpectedly large

Assume I generate some data with a very tiny random effect and calculate a lmer (y ~ group + (1 | surgeons)) and glm (y ~ group) ...
1answer
26 views

### GLM weights vs. identical observations

I was recently working on a homework assignment on binary GLMs and the following question came up when comparing solutions with a classmate. The data for the problem was given as a contingency table, ...
0answers
3 views

### Gaussian Linear Model with Normalized dependent variable - statsmodels

I used MinMax normalization technique before applying GLM regression to my dataset. I have a few questions: Can I apply such transformation before fitting linear models? Which transformations could ...
1answer
10 views

### Survival Analysis - Hazard Ratios of One - Interpretation and Model Fit

I am using Cox Proportional Hazards for a set of data. I continue to find variables with hazard ratios equal to one. I understand that these variables are not hazardous/protective to the life of the ...
0answers
4 views

### R: INAR / Integer-valued Autoregression order 1 with Poisson and Negative Binomial

I have panel data that contains a number of claims of an individual (i) in a few periods (t). I want to fit the INAR(1) model with generalization to Poisson and Negative Binomial Distributions. Did ...
0answers
19 views

### Correctly applying predictors to a GAM

I'm looking to apply a Generalized additive model towards my dataset. Essentially, I want to show if diversity (species diversity calculated via shannon index), is correlated with a set of predictors ...
1answer
48 views

### Which of these regression analysis to use?

I come primarily from a machine learning background, which I believe is what you'd say as a predictive form of analysis. However, I am now trying to publish some results in a paper about how different ...
1answer
38 views

### Binomial GLMM with proportions and categorical predictors

Study background My research question looks at the effect of age group (AgeGr) on gazing. Each infant was observed for 1h and signals with gazing (...
0answers
23 views

### Are lme4 convergence warnings indicating that I should instead run a glm?

I am currently trying to model a very large dataset to understand if equipment model has an effect on hour_detections. The data ...
1answer
18 views

### How to interpret poission regression coefficients?

I am given the following problem: Suppose that we observe $n$ independent count outcomes, where $n/2$ are from class 0, coded as $0$, and $n/2$ are from class 1, coded with $1$. The sample mean of ...
0answers
32 views

### Interpreting a binomial regression model in R with cloglog link function [duplicate]

I have built a binomial regression model using the equation: ...
0answers
14 views

### How do I model 2 variables that both affect eachother?

I am trying to model the relationship between tourism traffic and the proportion of coral reef bleached over time. I noticed that an increase in tourism will increase the proportion of reef bleached ...
0answers
8 views

### Regression of bounded count variable, with zeroes, and non-independent trials

I'm looking for a way to model 'days alive and out of hospital' after surgery (see link). The variable is basically a count of patient status on each followup day, but is quite badly behaved, ...
0answers
13 views

### Can someone explain why would glm() and multinom() in R give different results? [duplicate]

I am analysing data of covid19 patients and trying to determine which illnesses could be detrimental for the outcome. In the original data table there are three possible outcomes - 1 (recovered), 2 (...
0answers
16 views

### Why the p-value of the interaction term changes when changing the link function of binomial Generalised Linear Model

I have fitted three binomial generalised linear models with three different link functions in order to investigate the relative risk/odds ratio/probability difference of the data. fiverelapse: an ...
1answer
43 views

### Help with Poisson regression accounting for repeated measures

I'm not a statistician, but need to use these clever tools to analyse some data I have. I have a really simple dataset to analyze (see below. cases=disease counts, pop=total number of subjects sampled ...
0answers
11 views

### Can you compare results of LASSO and penalized cubic regression splines?

I'm trying to determine which predictive variables have the biggest influence on my response variable. I feel that my continuous predictive variables are best modeled with a GAM, but as I understand ...
0answers
70 views

### What is a partial chi-square statsitic according to Frank Harrell?

In his RMS course (section 4.1.1), Frank Harrell mentions the use of a partial chi square statistic for measuring the strength of association between a predictor and an outcome. See below for a ...
1answer
13 views

### binomial vs betareg? glm for y=ratio

https://docs.google.com/spreadsheets/d/1e_XOgTv1flSFFleHSwUJJPBzBdd9VPXRaZc2oukwtrE/edit#gid=0[data] I'm using glm to evaluate the response of mammal species to different % of forest cover. My ...
1answer
24 views

### In multiple regression with all significant predictors, is there a way to test significance between predictors?

In multiple regression with significant predictors, is there a way to test significance between predictors? For example let's say you have a multiple regression and you have 4 predictors that are all ...
0answers
31 views

### When a scalar variable is normally distributed, how does one estimate the standard deviation of this underlying distribution using linear models?

I have a sample of N for two variables X and Y, where Y can be assumed as equal to bX + $\epsilon$, b ~ N($\mu$,$\sigma$), and $\epsilon$ ~ N(0,1) Using a simple linear regression, I tried to ...
0answers
14 views

### On the detection of the predictors responsible for the separation in logistic regression

I'm using multiple glmm models and I have separation and pseudo-separation situations. I want to know if there are any tools in R to extract the predictors ...
0answers
8 views

### Interaction between factors in a linear generalized linear model

I am running a generalized linear model in SPSS. I have one dependent variable (continuous) and two categorical independent variables. For some reason, when I run the analysis, the output just gives ...
0answers
15 views

### two groups difference with control

I'd like to test whether a binary variable, adhdCNN, differs between the two groups identified by the binary variable group, ...
1answer
31 views

### Appropriate choice of F1 score

We can compute the F-1 score in the following two ways. $F_{1_{PRE, REC}} = 2 * (PRE * REC) / (PRE + REC)$ $F_{1_{TP, FP, FN}} = (2 * TP) / (2 * TP + FP + FN)$ Both computes F1 score, but which one ...
0answers
22 views

### Preprocessing on propensity score matched data

I did preprocessing, then propensity score matching using logistic regression, and then fit a glm to the response variable of interest. However, the odds ratio obtained was 0.0008 (while it should be ...
0answers
4 views

### glm - correction for dependent variables

I am currently performing an NMDS in conjunction with glm to analyse lipid patterns. However, my data has two levels (Horizon) which make my variables dependent. Previously I had used the "+Error&...
0answers
17 views

### Determine distribution for GLM

I would like to determine the distribution for the following data in order to explain it with a generalized linear model and further parameters: A K-S test for Poisson distribution has already been ...
1answer
20 views

### Is it possible (and even correct) to calculate a confidence interval from an interpolated value?

I am using a probit model to calculate the limit of detection of a diagnostic test. For this, in R, I used glm(): ...
0answers
14 views

### Which analys should i perform? [duplicate]

I am trying to work on the data of my master thesis. I have to perform statistic analysis but i dont know if i should use on R lm glm or lme. I have 58 sample points each has two value: altitude and ...
1answer
27 views

### How can standardize=TRUE and intercept=FALSE be available at the same time in the function glmnet?

glmnet is a widely-used R package for generalized linear regression. Among the arguments passed to the main function ...
0answers
17 views

### R glm() does not converge / huge standard errors: collinearity? [duplicate]

I am trying to run a fixed effects logit-regression in R using glm() as follows glm(binary_outcome ~ as.factor(region)*as.factor(birth_cohort) + as.factor(region)*as.factor(gender)+as.factor(...
1answer
24 views

### Interpreting regression coefficient for categorical outcome variables

I have a linear regression model, where the outcome variable diagnosis is a categorical variable representing a tumor being either "malignant" or "...
0answers
6 views

### GLM R: How to add zip code fixed effect in model

I am building a logit model to model the probability of a dwelling X to invest/not invest in a energy program. My model looks like this: ...
0answers
27 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 ...
1answer
39 views

### which analysis fit the best for the data?

I am trying to work on the data of my master thesis. I have to create a model, but I don't know which analysis perform. My data look like this number ID sp ab alt SWdiv 1 A1 4 6 630 0.25802965 2 A2 ...
0answers
21 views

### Regression model for extremely right-skewed and zero-inflated data

Background I'm trying to predict the cost of road network performance (a scalar) from a set of 142 predictors -- 71 describe the fragility of each bridge in the road network and 71 describe the ground-...
0answers
4 views

### GLMM appropriate for constant covariates/ baseline score? Or Ancova?

I was wondering whether my data is appropriate to fit a glmm (with r package lme4) So, I measured a questionnaire two times (q1 and q2). Also, I have variables ...
0answers
19 views

### Design of contrast for GLM in voxel-wise analysis

I'm attempting voxel-wise analysis of biomedical imaging (DWI-MRI) using FSLs GLM GUI (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/GLM) but got confused when designing more complex experimental designs. ...
0answers
23 views

### Large coefficent estimates with GLM in R [duplicate]

I have run a glm on my data set to try to predict the probability of is_donor (a binary 0/1 variable). I'm seeing massive ...
0answers
13 views

### How to deal with unbalanced categorical data in GLMM?

I'm trying to model species sighting data across protected areas in R. Naturally, the data are unbalanced - but it is severely skewed towards one protected area (as in, 200 sightings in 1 PA, 15 in ...
0answers
33 views

### Can I use compositional data in a GLM?

I have landing data (kg) of five species where I try to identify which factors may be contributing most strongly to the high catch. Before, I had 4 predictor variables (Depth, Chlorophyll, Temperature ...
0answers
16 views

### Difference between univariate and multivariate linear regression

I have a very simple question: I am studying linear regression, and I have a doubt. We know that the linear regression model (generalized multivariate) can be written like: Yi=𝛽0+𝛽1Xi1+𝛽2Xi2....+𝛽...
1answer
38 views

### Finding a confidence interval for difference of proportions

Let two independent random variables, $Y_1$ and $Y_2$ that have binomial distribution have parameters $n_1 = n_2 = 100$, $p_1$ and $p_2$, respectively, be observed to be equal to $y_1 = 50$ and \$y_2 = ...