Questions tagged [controlling-for-a-variable]

A control variable is one which is included in a model primarily for its impact on the total model rather than for its own substantive interest.

159 questions
Filter by
Sorted by
Tagged with
39 views

Adding Controls to Staggered Difference in Difference Regressions on Stata

I am running a staggered diff-in-diff model, looking at legalization's effect on various variables. For context, only a percentage of all states have legalized, and the year they legalized differs ...
7 views

Bad control problem when controlling for one of the two mediating paths?

Is the following a bad control situation? Suppose I have a DAG with the following paths,$$X\to Z_1 \to Y \quad\text{and}\quad X \to Z_2 \to Y$$ Then would controlling for $Z_1$ only give the effect of ...
35 views

How to compare more than 2 groups on the group rate?

I need to compare more than 2 organizations on the number of events each has, controlling for the number of buildings. The number of events per organization is small (0 - 6) and the number of ...
• 1
16 views

ANOVA or ANCOVA? I have a control variable

In my study, I am analyzing 4 groups, as it is a 2 (primed or not primed) × 2 (high efficacy or low efficacy) experimental design. I am planning on using ANOVA between-subject analyses to test for ...
7 views

Difference-in-difference covariates affecting outcome but failing parallel trends

I am performing a difference-in-difference analysis and, as advised by this post, ran my regression with each of my covariates as the outcome. I did this for each covariate individually using the ...
10 views

Can controlled variable, which are nested in the independent varables, be controlled by the Likelihood ratio test?

I have a base model: leader ~ gender + posture leader is the dependent variable. gender and posture independent variables. I want to control for control variable, ...
1 vote
14 views

When do control variables increase precision?

Suppose we're interested in the effect $\beta$ of a treatment $D$. To increase the precision of our estimate (ie., reduce the variance of $\hat{\beta}$), we can include a control variable $X$ that ...
• 31
59 views

Controlling for time elapsed between baseline and treatment

I'm having a mixed model with 5 repeated measurements (time is categorical because the timepoints represent discrete events). Edit: I have 5 meaningful timepoints: t0 baseline (neutral timepoint); t1 ...
• 25
149 views

Multiple regression - conceptual questions

Problem statement: I'm working on a multiple regression after running an RCT, to confirm treatment effectiveness and quantify effect size. Initially, when I regressed a dependent variable against some ...
• 55
31 views

Mediation/moderation: when interested in the effects of X on Y, should I leave my mediator/moderator(+interaction) in the analysis?

If I am running a mediation analysis (X: independent; Y: dependent; M: mediator; also applies to moderation), but I am also interested in the simple correlation between X and Y (i.e., for my first ...
45 views

controlling for a categorical variable

I am performing a regression and have multiple control variables such as Religion, Caste, Highest Education of Adult in the Household, and Income Source. This might be an easy question but I was a bit ...
117 views

Controlling for non-linear variable in non-linear modeling of response

I need to model a continuous response variable $y$ based on continuous features $x_1, ..., x_n$ while controlling for another continuous feature $x_c$. The intent is to understand how much an increase ...
• 4,726
39 views

Calculation of ATU (aka ATC) instead of ATE in Titanic dataset in Causal Inference: The Mixtape

I think there are some mistakes in chapter 5 of the book Causal Inference: The Mixtape by Scott Cunningham (2021), but I want to check that I'm not just misunderstanding. The book is available for ...
• 617
1 vote
52 views

When is a Control a Bad Control Exactly

Hi just had a short question. If a control variable is caused by another control variable would that make it a bad control? I know control is bad if it is the direct outcome of the treatment but in ...
48 views

Interaction control variables in a difference-in-difference regression

I have a question with regards to control variables in a difference-in-difference regression. I would like to know the difference between including single control variables and including control ...
1 vote
33 views

Do control variables in regression models have to be confounders? [duplicate]

So everything I'm reading on this throws out a different answer. Do control variables in regression models have to be confounders, that affect both the independent and dependent variables? I have an ...
• 61
1 vote
65 views

Should I incorporate sex as a control variable or use multi-level modelling?

I'm doing a linear regression model to look at how socio-economic status impacts children's height. My dataset will be survey data for both males and females. To me, it makes sense to control for sex, ...
• 61
84 views

Question about statement in Oster (2019): variation in a control

In Oster (2019), she discusses how authors typically include controls and examine coefficient stability as a way to test for presence of confounding, and points out that researchers should consider ...
• 385
18 views

Controlling for categorical variables

I have 8 independent variables which may be nominal or ordinal, and I want to see how each of them affect a numeric dependent variable $Y$, so that the effect of $X_{1}$ is controlled by the rest of ...
12 views

How do you "correct" a dependent variable for an independent variable? [duplicate]

How do you "correct" a dependent variable for an independent variable (which shows a correlation with the dependent variable but is not a significant predictor in the model/regression ...
37 views

model output without correlation to input variable

let's assume that a,b,c,d,t,u,v,w,x,y,z and o are all correlated to one another. I want to make a prediction for outcome variable "o". However, I don't want my prediction to be to ...
53 views

Do I control for different effects by adding the variables to the regression?

I'm trying to understand the dynamics of fixed effects in R. Regression without FEs: lm(return ~ esg_score + education, data = df) Do I manage to control for: ...
51 views

Is "controlling for variables" via multiple regression the same as feature importance, SHAP values with regression via xgboost?

There are a few posts going over the fact that "controlling for variables" in traditional stats involves building a regression model and including possible covariates in the model. An ...
51 views

How do you control for a variable in SEM with mediation? What do I regress onto my control variables?

I have an SEM model that tests for mediation. There is 1 independent variable, 1 mediator, and 2 dependent variables. All these variables are continuous. I want to control for the following variables:...
53 views

How to further explore the effect of a covariate variable in a repeated measures ANOVA in SPSS?

Using SPSS, I've fitted a model with a repeated measures ANOVA with those predictors: two within-subject variables many "covariate" variables The effect I'm mostly care about is the ...
• 177
73 views

Lavaan Mediation Analysis with 2 covariates

I’m running mediation analysis with ocd symptoms as a predictor and depression (mdd) symptoms as an outcome. I’m using lavaan in R. I have data from 3 time points and i want to control for time 1 mdd ...
3k views

Why do we do matching for causal inference vs regressing on confounders?

I'm new to the area of causal inference. From what I understand, one of the main concerns that causal inference tries to address is the effect of confounders! For the sake of reference, let's denote ...
• 325
31 views

Percent Change as Predictor and Response variables?

I am interested in the relationship between magnitude of change between two correlated variables i.e., after training, if performance increased by X%, does the %increase in task 1 predict the %...
82 views

Controlling for age in $t$-test

I have submitted a paper where I have performed a $t$-test between 2 groups A and B (coded as a dummy variable) to compare the mean of an Inattention scale derived from CFA analysis of the ADHD self-...
• 33
20 views

Simple question of how models deal with control variables

Apologies for the very simple question, it's something I've had trouble wrapping my head around: How does a model (e.g. logistic regression) deal with control variables - if the purpose is to keep a ...
9 views

Let's say I am interested in the extent to which a wage difference between men and women is caused by different levels of education between men and women. I know one would typically use Oaxaca-Blinder ...
20 views

I have three related questions: For causal inference, does a variable that is an outcome of the variable of interest also need to be confounded with the outcome variable for it to be a bad control? ...
35 views

How to "correct for" a categorical variable on an outcome

I want to compare the outcomes of individual subjects. This outcome changes systematically depending on the subject's location (e.g. it will always be lower in a certain location). I want to be able ...
• 3
5 views

No change in the coefficients of my time-specific variables of interest when controlling for demographic effects

I have a balanced panel set and I study the following model: lm(value ~ task*jan20 + task*feb20 + task*mar20 + task*apr20 + demographic criteria), ...
26 views

Anova-controling for age and gender

I have recently submitted a paper, and one of the reviewer rejected it since I did an ANOVA without controlling for basic demographics (age, gender) In my ANOVA, I have 3 groups : nascent, early, ...
• 33
215 views

Difference-in-differences and control variables

Im currently processing a bigger assignment, and I'm trying to reproduce the following table, which are difference-in-differences (DD) estimates of income change on voter turnout. However, as far as I'...
1 vote
79 views

"Bad" control variables in randomised treatment trial

I am analysing the effect of a randomised treatment on several outcome variables. First i am interested in whether the treatment changes the first outcome (non-pecuniary value) by controlling for ...
• 31
41 views

Extreme differences between control group and affected group

I am reviewing an article and cannot be overly specific but it involves one group of people with a medical condition and another group without it; the dependent variables are various mental health ...
• 94.5k
15 views

"Controlling for a variable" - can I predict from a Bayesian model having set a covariate to zero?

Someone once said that anyone who talks about 'controlling for a variable' probably doesn't understand statistics. I'm one of those people, alas. I've been using the R package Hmsc to build a spatial ...
27 views

How to address control, extraneous and confounding variables?

I was going through a tutorial here and it has the below info "Controlling for a variable” means modelling control variable data along with independent and dependent variable data in regression ...
• 1,758
1 vote
12 views

Controlling for a variable almost the same as my moderator in interaction regression - colonial data question

I'm unsure of if i'm avoiding intermediate variable as controls in my interaction model, since the controls are fixed at the same time as the variable I'm adding in my interaction term. My model is as ...
21 views

Controlling for a variable in Multiple Linear Regression

I´ve been performing a Canonical Correlation Analysis between two sets of variables (7clinical and physiological). However, it ...
• 101
301 views

Controlling for population size, using per capita or including a variable for population size

This question is based on the premise of a previous discussion: Is there a difference between controlling for population size directly vs. putting variables in per capita terms? I am curious if based ...
35 views

In linear regression, is "controlling for a variable" implemented by one-hot encoding/dummy variable/design matrix? [duplicate]

The literal meaning of "controlling for a variable" is self-explanatory -- it means we want to "isolate" the effect of the controlled variable to study the effect of those "...
173 views

Can Lord's paradox be caused by regression to the mean?

I am trying to understand Lord's paradox, where controlling for baseline status can affect inference. I tried to set up some data following the quotation in Wikipedia “A large university is ...
• 31.2k
1 vote
61 views

Retrieve random effects from an instrumented RE model

I am writing my term paper and I feel a demand to retrieve the individual effects from a Random Effects Instrumented Model (due to the usage of lags of regressors as the instruments, the panel is ...
• 11
1 vote
13 views

Can I use the principal components of control variables in regression?

I am running a logistic regression and one of my control variables is categorical with $100$ categories. This leads to problems because some categories have $3$ data points, out of tens of thousands. ...
• 1,669
1 vote
179 views

Variable controlling in linear regression and covariates

I am analyzing cardiac data and have interests in cardiac problems and exercise. I just want to focus on the exercise effect and found AGE is significant variable. I'd like to control AGE variable ...
• 27
144 views

How to control for a variable (gender of participants) in GLMM?

I recently tested some participants on a navigation task. The success rate in the navigation task is a binomial record of pass (1) and fail (0). I assessed participants in different environmental ...
• 33