Skip to main content

All Questions

Filter by
Sorted by
Tagged with
5 votes
2 answers
109 views

How to calculate the reference level interaction in regression in R?

I am very confused on calculating the reference level interaction in regression in R. Here is the sample code: ...
doraemon's user avatar
  • 364
4 votes
2 answers
125 views

Interpreting main effects with dummy coded and continuous predictors in regression

I have a logistic regression predicting probability of a 'yes' response given 'condition' (A,B,C,D; dummy coded, with 'A' as the reference level). This will produce estimates for the following: ...
SilvaC's user avatar
  • 542
1 vote
2 answers
87 views

Number of Phones in a word: Numerical or Categorical Data?

I'm trying to model a subset of the MALD dataset (language related) using Gaussian Distribution. MALD: https://link.springer.com/article/10.3758/s13428-018-1056-1 One of the variables I'm working with ...
karak87rt0's user avatar
0 votes
1 answer
57 views

Interaction with dummy variable: How to access std. error, t value, p value, (and others) for the opposite manifestation of dummy

Preparation Using R-Libraries: library(dplyr) The situation Data Given the data ...
user1's user avatar
  • 101
3 votes
1 answer
137 views

Dummy Variable Trap & Interaction Term?

Suppose we create a dummy variable male (1=male, 0=female) and dummy variable female (1=female, 0=male). Does the dummy variable trap, also occur, if we include them into interaction terms: $Y_i = β_0 ...
Marlon Brando's user avatar
1 vote
0 answers
285 views

Interaction between two binary variables in lavaan

I have two binary variables (X1 and X2, coded 0/1) as predictors in a growth model in lavaan. I want to understand their individual contributions and their ...
Jeanne Sinclair's user avatar
1 vote
1 answer
171 views

Dummy interaction term in an ARIMA model

How to include a dummy interaction term in an ARIMA model? Can we use the dependent variable (in this case, say the log return of an asset price at time $t$) to multiply with the dummy variable as an ...
Jyoti Nair's user avatar
2 votes
0 answers
35 views

Should I exclude dummy variable created from independent variable in multivariate regression model?

I have the following model: $ \ln(wage) = \beta_0 + \beta_1educ + \beta_2educ*college $ the variable $college$ is from the condition that if $educ \geq 16$. Should I include the variable $college$ in ...
Possawat Suksai's user avatar
3 votes
2 answers
131 views

How to interpret dummy variables and interactions terms on dummy variables in a regression?

Suppose I have a linear regression form of $$ \log(Y) = \beta_0 + \beta_1X_2 + \beta_2X_3 + \beta_3X_1Z + \beta_4X_2Z + \epsilon $$ where $X_1, X_2, X_3$ are binary and $X_1$ is omitted as a reference ...
user321627's user avatar
  • 4,260
2 votes
1 answer
77 views

Interaction with indicator function instead of dummy

I am running a regression of Y on X (both are continuous variables). I'd like to measure how the effect differs between two groups of individuals, coded by a dummy variable Z. The traditional way of ...
Victor's user avatar
  • 21
3 votes
2 answers
1k views

Which groups are reference groups in a regression model with interaction?

What are the reference groups in a regression model where there are interaction categories? Using the iris dataset in R, I've created a category with three levels ...
geoscience123's user avatar
0 votes
1 answer
68 views

Are these effects missing from my glm output because of a possible dummy trap?

I have a few generalized linear mixed model questions. I have an experiment that asked "is there a differential response between asexuals and sexuals by population density?". I am ...
bribina's user avatar
  • 55
1 vote
1 answer
426 views

Interaction between quadratic term and dummy variable

Suppose I have a linear regression: $Y=\beta_1+\beta_2X+\beta_3X^2+\beta_4D$ where $D$ is a dummy variable that takes value 0 and 1. If I want to examine if the effect of $X$ on $Y$ for $D=0$ and $D=1$...
newt335's user avatar
  • 23
1 vote
1 answer
619 views

Interpretation of two dummies interacted with one continuous variable

I am currently looking at the following equation using Stata and unsure of how to interpret the interaction terms when there are three variables interacted together (2 binary variables and one ...
Alisa's user avatar
  • 11
1 vote
1 answer
2k views

Interaction effects in regression models - should I include reference category?

I have a question about coding interaction effects using dummy coding which I’d be really grateful for your advice on please. Imagine I want to design an experiment to measure the impact of amount of ...
george_psych's user avatar
1 vote
1 answer
283 views

Encoding hierarchical relations between samples for machine learning

I have a set of samples with a corresponding set of continuous features which I am using to make predictions about a particular property of the samples. However, the samples are organized in a ...
A. Bollans's user avatar
0 votes
0 answers
237 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
3 votes
1 answer
909 views

Interpreting the effects of dummy interactions

Warning This question is quite long, and maybe a lot of you will think it is too long. I however thought, and hope, that if this question gets a proper answer, it will actually be a really good post ...
Tom's user avatar
  • 528
2 votes
2 answers
1k views

Interaction term with categorical predictors with more than one level

I am looking at the interaction between education (LTHS, HS, SOME COLLEGE, COLLEGE) and race (WHITE, BLACK, HISPANIC, ASIAN, NATIVE AMERICAN). I am using SAS and am including a class statement in my ...
Jennifer's user avatar
1 vote
1 answer
81 views

What is the correct way to test multiple dummies?

I'm discussing a topic with classmates and the textbook does not address our concerns. In the following model: $$wage = \beta_0 + \beta_1 female + \beta_2 educ + \beta_3 (female \times educ) + u$$ it ...
chatGPT's user avatar
  • 127
1 vote
0 answers
368 views

Panel Data Regression in R with Dummy Variables [closed]

I am currently working on my thesis and thereby analyzing the effects of the increase of COVID-19 cases on the main stock indices of the G7 countries. For this purpose, I have divided the whole period ...
Rachel's user avatar
  • 11
0 votes
1 answer
276 views

Stata Logit Model: Dummy Interaction With/Without Dropping Intercept vs Sub-Group Odds Ratio

Regarding data, there are three binary variables: trt(0,1), fail(0,1), and female(0,1). For sub-group analysis (male vs. female), I am running typical 2x2 treatment vs. failure tables separately for ...
user avatar
1 vote
0 answers
56 views

Categorical x continuous variable interaction in regression?

I have a sample containing two subgroups and I would like to measure the relationship between two continuous variables across the entire group and check if there's an interaction with subgroup. First, ...
EmbarrasedBadger's user avatar
2 votes
2 answers
12k views

Why, or why not, factor categorical variables in regression modeling?

I'm currently in the midst of running several logistic regression models to test for effect modification (i.e., testing interaction terms) between two categorical variables (sex and age as a ...
Brennan Beal's user avatar
0 votes
1 answer
27 views

What is the best way to examine the interaction between student gender at level 1 and instructor gender at level 2 in a multilevel model?

I am building a multilevel model with students at level 1 and instructors at level 2 and I have variables at each level to indicate the gender of the students and their instructors (see coding below). ...
Nate's user avatar
  • 1
0 votes
1 answer
971 views

Interaction term gender interpretation stata

Hi, I have a hard time interpreting these coefficients in collum 2. So my dependent variable is if you have a supervisory job yes=1 and my independent variables are female=1 and traditional values=1....
Sabine's user avatar
  • 35
1 vote
1 answer
581 views

Difference between using an interaction term for categorical predictors vs. creating subgroups (linear regression)

In a linear regression with two categorical predictor variables: Let's say the most simple case (e.g. 0= male, 1=female; 0= no vegetarian, 1= vegetarian), so based on those two nominal variable a ...
Rasul89's user avatar
  • 153
1 vote
0 answers
3k views

Dummy variables and interactions

To avoid perfect multicollinearity, a common practice is to drop one dummy variable when encoding categorical variables in a linear regression model (avoiding dummy variable trap). I am using this ...
towi_parallelism's user avatar
1 vote
0 answers
72 views

Main effect omitted as it is time-invariant. Is including the interaction without the main effect an issue?

I am interested in the impact of Unemployment (U) on Gross Domestic Product (GDP). I also want to check if the effect is different for developed countries and developing countries. I am using 10 ...
Jacob Jacob's user avatar
1 vote
1 answer
107 views

Can I use the interaction between a dummy variable and the variable it was derived from?

I am trying to make a multiple linear regression model. I have a hypothesis that $x$ is a significant predictor of $y$ but only when $x > 0.5$ ($x$ ranges from -2 to + 2). Is it acceptable to ...
crams's user avatar
  • 123
1 vote
0 answers
96 views

Multiple interaction terms for dummy variables?

IV: State (NJ, HI, CA, FL) (reference =CA) Moderator: # of hours exercising DV: BMI In this case, the IV is categorical and I have 3 dummy variables. As such, I created 3 interaction terms. In using ...
Dee's user avatar
  • 11
1 vote
0 answers
99 views

Interaction term btw. binary and continuous variable - dropping the intercept? [closed]

I run a linear regression with many dummy variables (in total 10). Thus to avoid the dummy variable trap, I dropped the intercept and included all dummy variables. Now I'd like to have a look at the <...
HAL_71's user avatar
  • 11
4 votes
1 answer
382 views

Can I remove a dummy variable when it is not significant by itself, but its interaction with another variable is?

I have the following model based on the financial returns of a company as a dependent variable of a stock market index, and a dummy variable interacting with USD exchange rates to my currency. The ...
Delta's user avatar
  • 173
5 votes
1 answer
2k views

Problems from having too many interactions in a regression?

Excluding the 'dummy variable trap', are the problems from including too many interaction terms in a regression any different from the problems of including too many continuous or binary variables in ...
StatsScared's user avatar
  • 1,228
0 votes
1 answer
440 views

Interpreting dummy variable interaction terms

I am attempting to model monthly retail electricity sales. To account for both the effects of seasonality and weather, I created an interaction term by multiplying 12 monthly dummy variables by the ...
Darlene's user avatar
0 votes
1 answer
56 views

Dummy code interaction among categorical variables [closed]

Do you know if there is a way of dummy coding the interactions among three independent categorical variables using SPSS? (with two levels each)
Tom's user avatar
  • 7
0 votes
0 answers
27 views

Multiple linear regression with dependent as a dummy predictor

I have a model $Y = \alpha + \beta_1X_1 + \beta_2X_2$. $Y$ has a bimodal normal(ish) distribution, so I'm looking to see if the relationship between the predictors and the response is different for ...
user156060's user avatar
5 votes
1 answer
441 views

"Joint" dummy variables for two different variables

I am supposed to show the hazard ratio (HR) stratified by gender (1= female vs. 2= male) and age groups (quartiles, 1-4)*. The combination "female" and "first quartile of age" is supposed to be the ...
user avatar
2 votes
1 answer
389 views

interpreting coefficients of interaction terms between categorical variables [closed]

Assuming I have a linear regression model of the form: Y = a + (b1*fact1) + (b2*fact2) + b3*(fact1*fact2) + b4*other_var where, fact1, fact2 are categorical variables of 2 factors each, YES and NO ...
red4life93's user avatar
0 votes
1 answer
76 views

What would be the appropriate statistical test for my study?

What would be the appropriate test for a study that has: 2 categorical independent variables with 2 levels each, 1 moderator variable (and would it matter if my moderator is categorical or continuous?...
Aamir Kapasi's user avatar
3 votes
3 answers
3k views

Multiple regression with dummy variables and interaction term

We have done a multiple regression analysis to see how gender and experience affect salary. We used a dummy variable for gender and then we also added the interaction variable (female work experience)....
user avatar
0 votes
0 answers
33 views

Assess impact on results of participants recruited via additional outreach efforts

I am currently working on a project that evaluates certain study recruitment strategies in regards of increasing participation among different subgroups. One of those strategies is reminder letters. ...
JayZ's user avatar
  • 71
1 vote
1 answer
80 views

Is there a collinearity issue when using: x, dummy indicating extreme negative value of x and their interaction?

I was wondering whether I can build my baseline model using the following variables without incurring in any multicollinearity issue: $X_1$= Net capital flows over GDP (which may be positive and ...
Macrina 's user avatar
2 votes
1 answer
478 views

SEM setup question: Dummy coding with interaction term

I have an SEM that fits well according to several metrics and returns meaningful results. However, I'm not sure if the structure is valid. I have 3 between subjects conditions (2 treatments and one ...
N Matthews's user avatar
3 votes
1 answer
543 views

Can you have interaction terms for both "sides" of a dummy variable in a single regression?

I'm really not sure how to phrase my question properly, so I apologize if this has been answered elsewhere. Let's say I'm interested in using a regression to predict wage using sex and an interaction ...
Mike's user avatar
  • 33
6 votes
1 answer
2k views

Separate Models vs Flags in the same model

I have customer data from 2 brands. The data structure are the same, but I expected the customer behaviour to be different in different brand. So I could train 2 models, 1 for each brand, or I could ...
BigName's user avatar
  • 163
2 votes
1 answer
1k views

Question about interpreting interactions between three level dummy coded variables in R

I have two, three-level, categorical variables in R. Both are reference coded using level 1. I run a mixed effects linear regression using trial level data. The R output provides separate interaction ...
Dave's user avatar
  • 2,701
0 votes
1 answer
2k views

Interaction term with several levels in multi linear regression in R [closed]

first of all thank you very much for admitting me! I am currently stuck with a problem regarding interaction terms: I would like to interact a categorical variable with several levels with a ...
Cgal's user avatar
  • 25
2 votes
1 answer
3k views

Interaction terms, dummy variables, and fixed effects

I am getting very strange results for an interaction term in a model I am fitting. I am interested in the impact of uncertainty on investment. The theory predicts that the effect of uncertainty on ...
Economist_Ayahuasca's user avatar
1 vote
2 answers
201 views

how does adding a interaction of categorical variable influence the number of betas

I have a multiple linear regression model: $$y= \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + \beta_4 x_4 + \beta_5 x_5$$ where $x_1$ is a continuous variable and $x_2$, $x_3$, $x_4$ and $x_5$ ...
Roya Yu's user avatar
  • 11