Linked Questions

1 vote
3 answers
5k views

Is it advisable to drop certain levels of a categorical variable? [duplicate]

Let's say that I have one categorical variable with six levels, and I then create five indicator variables in order to represent the six levels. If two of the five variables are insignificant, then do ...
mmmmmmmmmm's user avatar
2 votes
2 answers
9k views

What to do with dummy variable that is not significant? [duplicate]

I´m running a binary logistic regression to predict the purchase probability for a product. My model contains mostly dichotomous and categorical variables. One variable, let´s say "decision maker", ...
user98872's user avatar
8 votes
1 answer
3k views

If a factor variable is to be dropped in model selection, should all levels be dropped simultaneously? If so, why? [duplicate]

In answer to a previous question factor pooling in model selection was discussed. If a factor or categorical variable is to be dropped in model selection, should all levels be dropped simultaneously? ...
fmark's user avatar
  • 4,977
1 vote
1 answer
4k views

How to Interpret p-value for categorical variable in multiple linear regresion? [duplicate]

I have a query on how to interpret the result for multiple regression with categorical variables. I have categorical variable called Stay_In_current_city_years which has 5 levels. After running the ...
User 3400's user avatar
1 vote
0 answers
2k views

GLM and categorical variable R - remove one category [duplicate]

I am currently running quasipoisson models with a continuous response variable and 13 covariates. I am using glm() and summary()....
Elena Spark's user avatar
1 vote
0 answers
823 views

How to drop certain values for a factor variable while fitting a GLM? [duplicate]

My response var is a binary variable. In the predictor variable i have a type variable with levels as l1,l2,l3,l4. And when i run a logit (glm(redonse ~ type, family = "binomial"), Some levels of type ...
Chirayu Chamoli's user avatar
0 votes
1 answer
723 views

What to do with statistically insignificant dummy/categorical variables? [duplicate]

From the research I've done the common answer is that you can not remove insignificant dummy variables from a regression. I'm having a hard time finding academic papers or books that back up this ...
Peyton's user avatar
  • 1
1 vote
2 answers
148 views

R linear regression - how to handle when some factors significant while others aren't [duplicate]

I'm playing with the Titanic data set, and trying to figure out what to do about the results I got from a lm that predict the age of the passenger. How should I handle the Cabin values? Some Cabin ...
user avatar
0 votes
1 answer
133 views

R - Analysis of a Qualitative Predictor with 30 levels [duplicate]

I'm running a multiple linear regression in R. In my linear regression I have 'country' as a qualitative predictor, which dramatically increases the adjusted R^2 value, and lowers my BIC. I want to ...
rjadler's user avatar
0 votes
0 answers
59 views

Dropping dummies from regression by putting them into the reference group [duplicate]

I have the following result of a logistic regression: ...
Bullzeye's user avatar
0 votes
0 answers
35 views

Does it make sense to only drop a specific level of a categorical variable? [duplicate]

I don't have SAS and the dataset with me, so I made up this table (from my memory). Basically this is what I got: After deciding to leave the variable $age$ and $risk$ in my model, I created this ...
3x89g2's user avatar
  • 1,686
0 votes
0 answers
33 views

GLM Logistic regression in R: one category is significant, but others are not. Should I drop the variable? [duplicate]

so I am using GLM for logistic regression in R and I have some variables with many factors. I ran the model and has the result like this: My question is: 1. Is this variable significant? ...
user71812's user avatar
  • 123
253 votes
8 answers
126k views

Algorithms for automatic model selection

I would like to implement an algorithm for automatic model selection. I am thinking of doing stepwise regression but anything will do (it has to be based on linear regressions though). My problem ...
S4M's user avatar
  • 2,698
107 votes
6 answers
41k views

Principled way of collapsing categorical variables with many levels?

What techniques are available for collapsing (or pooling) many categories to a few, for the purpose of using them as an input (predictor) in a statistical model? Consider a variable like college ...
shadowtalker's user avatar
  • 12.5k
11 votes
4 answers
11k views

How to apply coefficient term for factors and interactive terms in a linear equation?

Using R, I have fitted a linear model for a single response variable from a mix of continuous and discrete predictors. This is uber-basic, but I'm having trouble grasping how a coefficient for a ...
Trees4theForest's user avatar
4 votes
2 answers
8k views

Should the final R glm include only significant levels of factors

I am running a glm in R on data with quite many predictors (~50), both initially continuous and factors. The response is binary and the volume of the data is OK (~100K rows), in order to model non-...
coulminer's user avatar
  • 337
3 votes
2 answers
2k views

If I have one non-significant factor level in a glm, is that entire variable now considered non significant?

I have a question similar to this one, but I just wanted to follow on and ask if the entire variable is now insignificant? I have a factor with 3 levels. When doing the model simplification, it showed ...
trizzo's user avatar
  • 31
1 vote
2 answers
6k views

Regression with categorical predictors - use only some dummy variables [duplicate]

I am working on a regression and I have a factor variable "Marital Status" Marital status has 5 levels: Single, Married, Divored, Widowed, Other (don't ask me what constitutes someone being an 'other'...
Joel Sinofsky's user avatar
3 votes
1 answer
4k views

Categorical independent variable with three levels and binary logistic regression

I want to learn which level of a categorical independent variable should I look to interpret the odd ratios in binary logistic regression. For example, I have one independent categorical variable (...
user22125's user avatar
1 vote
1 answer
2k views

Does it make sense to apply recursive feature elimination on one-hot encoded features?

Does it make sense to apply recursive feature elimination on a feature set pre-processed with One-Hot Encoding? This is my code for feature selection: ...
Glory's user avatar
  • 11
4 votes
1 answer
700 views

When LASSO selects only parts of a categorical variable?

I want to use LASSO to construct a model and then run a logistic regression on the variables LASSO selects. However, LASSO selects only parts of some categorical variables that I put into it. Does ...
Paze's user avatar
  • 2,291
1 vote
2 answers
1k views

When fitting a multiple linear regression model, if one factor is insignificant, should I refit another model?

Let's say, I have: $y = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3$ I fit a multiple linear regression (MLR) model (lm() command) in R, and see a very large $...
Myla Izaman's user avatar
0 votes
1 answer
732 views

Can I perform RFE on a Categorical variable with multiple values?

I have a dataset with a variable called attributes and it is an "array" of strings. E.g. ...
terahertz's user avatar
  • 101
1 vote
1 answer
876 views

feature selection of sub-categorical data on a linear regression model

I have a data-set with 7 features, 6 numeric and 1 categorical. the categorical data is "Species", which has the ability to be sub-categorized (species, genus, family, order, etc...). I want to build ...
hswerdfe's user avatar
0 votes
0 answers
914 views

Interpreting regression coefficients with a multi-level categorical variable [duplicate]

How do I interpret the coefficients of a Regression with 1 continuous + 1 categorical predictor (with 4 levels - e.g., months) Specifically, is the 1st coefficient equal to that of the 1st month or ...
theforestecologist's user avatar
2 votes
0 answers
818 views

Feature Selection with Categorical Variables: Multicollinearity and Statistical Significance

Building a logistic regression model with three categorical features and one continuous. For simplicity, let's say I have the following features and variables: ...
vdiddy's user avatar
  • 89
2 votes
0 answers
721 views

Recursive feature elimination on just the train data or complete dataset

I am using RFE with logistic regression. I will also be doing cross validation with RFE (RFECV in sklearn) to get the optimum number of features. I am not sure whether to use RFECV on just train data ...
Vikrant Arora's user avatar
2 votes
0 answers
240 views

Split Factor Levels Or Not In Variable Selection

This question is related to previous ones but I believe distinct. I am primarily interested in prediction and I have access to LASSO variable selection (but without factor level grouping) using the ...
takintayo akinbiyi's user avatar
0 votes
0 answers
230 views

Significant variables with insignificant levels and vice versa in logistic regression

I hope all of us get well during the pandemic. I have conducted an analysis using binary logistic regression to investigate the interaction between gender (male, female) and official language ...
Quan Nguyen's user avatar
0 votes
1 answer
124 views

Is choosing only significant coefficients (based on t stats) from a multiple linear regression model a good idea, provided the F stats is significant?

I doubt if this topic has already been discussed here. I did search the forum before posting this question and read similar posts, however unable to find my answer, perhaps due to my limited ...
Prabhakar's user avatar
0 votes
0 answers
65 views

Logistic regression with only 1 dummy variable

I have the following dataframe in Python: ...
quant's user avatar
  • 511