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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
80 views

Can we isolate the effect of two different control variables in a semi-partial correlation?

I know that we are able to use a partial correlation when we want to correlate X and Y but Z affects both of them and that we may use a semi-partial correlation when we want to correlate X and Y and ...
2 votes
0 answers
22 views

How to study the impact of time in a mixed-factorial design?

I ran a study to compare 2 different computer interfaces (say A and B) meant to be used in an unfamiliar environment. I want to compare: How much effort participants took to complete a certain task ...
0 votes
0 answers
30 views

Control variables cofounding the effect of decisions in linear regression model used in sequential decision optimization

How can we be sure that confounding variables/control variables don’t pickup the effect our decisions w.r.t decision variables had on the actual control variable? Since the term control variable ...
1 vote
1 answer
30 views

Controlling for an effect by adding it as covariate in R

I have a dataset like this: individual1 individual2 Bray_Curtis Dyad_type proximity matriline id1 id2 Aapi App 0.47 1 0.14 1 1 2 Aapi Eis 0.60 2 0.03 0 1 4 Potj Popp 0.50 1 0.11 1 3 5 Aapi Potj 0....
5 votes
2 answers
176 views

Basic understanding of control variables in observational studies

I'd like to understand the basic logic for control variables in observational studies. According to Wikipedia, one should control for confounding variables, which "in this context means other ...
1 vote
0 answers
24 views

Is there a formal methodology for controlling a variable in a tree based model?

I am currently building a xgboost model to classify data into 6 categories of risk for insurance policies. I have 5 years worth of policy holder data, including policy year. When building a GLM for a ...
  • 11
1 vote
1 answer
23 views

Data points for some control variables missing in regression - still feasible?

I'm currently working on an event study to examine abnormal returns. In the first step, I've calculated abnormal returns in regards to a certain type of company event, consisting of roughly 13,000 ...
  • 11
2 votes
0 answers
86 views

Are control variables always exogenous?

My professor said that control variables are generally thought to be exogenous in an OLS context, i.e. uncorrelated with the main independent variable in my regression. However, I think that they are ...
  • 133
1 vote
0 answers
24 views

Panel Data with 2 IV and 1 DV

I am working on my thesis and I have a few questions about which method I should use for the analysis of my data. My research is about inequality in Europe, and in general households in Europe that ...
2 votes
1 answer
326 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 ...
0 votes
0 answers
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 ...
0 votes
0 answers
59 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
0 votes
0 answers
36 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 ...
0 votes
0 answers
49 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 ...
  • 1
0 votes
0 answers
13 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
0 answers
72 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 ...
0 votes
1 answer
68 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 ...
  • 27
3 votes
2 answers
168 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
0 votes
1 answer
42 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 ...
0 votes
1 answer
89 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 ...
  • 3
5 votes
3 answers
202 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,856
0 votes
0 answers
79 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 ...
  • 637
1 vote
1 answer
142 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 ...
0 votes
0 answers
115 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 ...
  • 5
1 vote
1 answer
56 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
1 answer
122 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
3 votes
0 answers
121 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 ...
  • 477
0 votes
1 answer
40 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 ...
  • 103
0 votes
0 answers
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 ...
  • 1
0 votes
0 answers
61 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 ...
5 votes
0 answers
83 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: ...
0 votes
1 answer
97 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 ...
0 votes
1 answer
154 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:...
0 votes
0 answers
188 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
19 votes
1 answer
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
0 votes
0 answers
43 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 %...
3 votes
2 answers
163 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-...
0 votes
0 answers
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 ...
0 votes
1 answer
37 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
0 votes
1 answer
409 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
1 vote
2 answers
142 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 ...
  • 41
3 votes
1 answer
50 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 ...
  • 95.7k
2 votes
0 answers
17 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 ...
1 vote
0 answers
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 ...
2 votes
1 answer
517 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 ...
0 votes
1 answer
40 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 "...
's user avatar
3 votes
0 answers
192 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 ...
  • 32.4k
1 vote
0 answers
72 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
0 answers
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,709
1 vote
1 answer
288 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 ...
  • 37