Skip to main content

Questions tagged [glm]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7 votes
1 answer
450 views

How to choose between different models with similar results? RF, GLM and XGBoost

I am a medical doctor trying to make prediction models based on a database of approximately 1500 patients with 60+ parameters each. I am dealing with a classification problem (mortality at 1, 3, 6 and ...
user145725's user avatar
0 votes
1 answer
166 views

Interpreting interaction term coefficient in GLM/regression

I'm a psychology student and trying come up with a research plan involving GLM. I'm thinking about adding an interaction term in the analysis but I'm unsure about the interpretation of it. To make ...
r_noobie's user avatar
0 votes
0 answers
1k views

NaN, inf or invalid value detected in endog, estimation infeasible error when training statsmodels GLM model

I am trying to build a GLM model (poisson family) using python statsmodels package on train data. The data I have contains categorical values as exogenous variables and numerical values for my target (...
Karima Touati's user avatar
1 vote
0 answers
69 views

Sudden jumps in accuracy with logistic regression and bag of words : "glm.fit: algorithm did not converge"

I work on a bag of words, on the Toxic Comments Classifications challenge. The challenge is closed but the dataset is very nice to learn. I use R, tf-idf, tm, and logistic regression. I have a strange ...
Xiiryo's user avatar
  • 111
1 vote
0 answers
79 views

Difficulty understanding the difference between Poisson, Quasi-Poisson, and Negative Binomial models

I will try to keep this short. As an assignment for my GLM course, we were given a dataset on the # of homicide victims a person knows, as well as the race of the person. The main idea is to answer ...
Ali Shana'a's user avatar
0 votes
0 answers
265 views

how to describe a decrease in sales

Hypothetically, if your company's sales had dropped significantly in 2020, what approach would you take to describe the cause? can you build a model to predict the decrease (between 2019 and 2020 for ...
Jack Smith's user avatar
1 vote
1 answer
5k views

Error while trying glmnet() in R: "Error in storage.mode(xd) <- "double" : 'list' object cannot be coerced to type 'double'"

I'm trying to create a logistic regression model using Ridge, this is the code: glmnet(X_Train, Y_Train, family='binomial', alpha=0, type.measure='auc') And this ...
JMarcos87's user avatar
  • 125
3 votes
0 answers
1k views

How to retrieve results summary from statsmodels GLM with regularization?

I'm trying to fit a GLM to predict continuous variables between 0 and 1 with statsmodels. Because I have more features than data, I need to regularize. ...
Rylan Schaeffer's user avatar
1 vote
1 answer
101 views

Predictive model to maximize sum of dependent variable?

I am trying to classify cars for a towing company. Junky cars earn more when sent to the junkyard, and the more valuable cars should earn more at the auction, despite the auction fee. Creating a ...
Lamden's user avatar
  • 11
2 votes
3 answers
3k views

Can GLM( generalized linear method) handle the collinearity between the predictor variables in a regression-analysis?

I'm a beginner in Machine learning and I've studied that collinearity among the predictor variables of a model is a huge problem since it can lead to unpredictable model behaviour and a large error. ...
Bharathi's user avatar
  • 277
1 vote
0 answers
100 views

Problem in performing LOOCV

I am trying to run LOOCV on my regression model. I tried to run it in r and encountered the following warning message: ...
Ayush Ranjan's user avatar
1 vote
1 answer
360 views

Fitting glm without explicit declaration of each covariate

When I fit a linear model with many predictor variables, I can avoid writing all of them by using . as follows: ...
Ayush Ranjan's user avatar
1 vote
0 answers
49 views

Select the right distribution

I have a dataset like: ...
Nathalie's user avatar
  • 147
5 votes
2 answers
177 views

How to interpret two continous variables output using GAM?

I really need help with GAM. I have to find out whether association is linear or non-linear by using GAM. The predictor variable is temperature at lag0 and the output is cardiovascular admissions (...
Hasan Sohail's user avatar
2 votes
0 answers
825 views

LASSO Regression using Panel Data

I have panel data for 3 countries, ranging over 3 years. The dataset is called CarProduction ...
JodeCharger100's user avatar
2 votes
1 answer
218 views

Select behavior dependant with other factors and its formalization

I'm studying occurence of Behavior11, Behavior12,Behavior2,...
ranell's user avatar
  • 71
1 vote
1 answer
161 views

Combining outputs of ridge regression models?

I am facing an issue where I have 7 sets of different variables/columns/predictors. I am trying to predict same target variable and I want to observe the importance/effect of all the sets according ...
PruthvijThakar's user avatar
1 vote
1 answer
608 views

r glm - Error in names(coef) <- xnames only for 2 columns in data

I am getting the below error when i run the R code for glm(): ...
surpavan's user avatar
  • 145
4 votes
1 answer
95 views

Alternative to VGAM for Zero Truncated Negativ Binomial GLM in R

Is there an alternative to the vgam Package to do a zero truncated negativ Binomial GLM in R?
JonJup's user avatar
  • 45
1 vote
1 answer
88 views

Changing reference class in imbalanced data drastically affects the error rate

Working on a binary classification problem that tries to predict customer churn, the data set is imbalanced with 2000 observations of non-churn cases vs 600 observations of churn cases. On using GLM ...
Vinay Tiwari's user avatar
2 votes
2 answers
1k views

How do I compare coefficients from my glm when I have more than one factor variable in my formula?

I am trying to model a binary outcome in R that has many independent variables. 5 of the Ivs are factors with more than two levels. When I try to remove the intercept it only does it for one of the ...
DiogenesTheDog's user avatar
3 votes
1 answer
267 views

Searching interactions with RandomForest and/or GBM

I'm trying to explain a count variable and a continious variable > 0 with GLM, using R. In order to improve the quality of the regression, I want to add some interactions that can be useful for the ...
ML94's user avatar
  • 31
-1 votes
1 answer
334 views

R how to find the top key parameters contribute to the response var change in two tables?

For example, if I create two tables, both contain multiple kinds of data: numeric (integer), numeric (continuous), and factor (character) like below: ...
alwaysaskingquestions's user avatar
2 votes
0 answers
39 views

Outputting risk groups for a logistic regression model

I have a problem with outputting the terms for a logistic regression model in R. For a given list of independent values, say list l of terms {w,y,z} to determine dependent variable {x}, I want to ...
uhhh_big_mike_boiii's user avatar
2 votes
0 answers
114 views

How can I use idh and random when I use hupossion in mcmcglmm?

Here is my problem: I need to use hupossion in MCMCglmm package. Here is my prior: ...
Feng Chen's user avatar
  • 207
2 votes
1 answer
12k views

Extracting model equation and other data from 'glm' function in R

I've made a logistic regression to combine two independent variables in R, using pROC package and I obtain this: ...
Ciochi's user avatar
  • 21
3 votes
2 answers
210 views

Extrapolating GLM coefficients for year a product was sold into future years?

I've fit a GLM (Poisson) to a data set where one of the variables is categorical for the year a customer bought a product from my company, ranging from 1999 to 2012. There's a linear trend of the ...
JenSCDC's user avatar
  • 317
13 votes
4 answers
17k views

Is GLM a statistical or machine learning model?

I thought that generalized linear model (GLM) would be considered a statistical model, but a friend told me that some papers classify it as a machine learning technique. Which one is true (or more ...
user77571's user avatar
  • 323