I am currently running a DID analysis to examine the effects of policy interventions.
I have a few questions about the control variables.
The current data format (example) is as follows.
I know that the time-invariant control variables (sex, age) have the same value at both time points, but how should I handle the time-varying variables (income, work) in the DID regression?
pid  | sex  | age  | income  | work  | 
1  | 1  | 50  | 200  | 1  | 
1  | 1  | 50  | 300  | 1  | 
2  | 0  | 30  | 500  | 1  | 
2  | 0  | 30  | 400  | 0  | 
3  | 0  | 20  | 600  | 0  | 
3  | 0  | 20  | 900  | 1  | 
4  | 1  | 40  | 800  | 0  | 
4  | 1  | 40  | 400  | 0  | 
1. Can I put the INCOME and WORK variables into the model together like the command below? If that's true, what is the interpretation of the results?
PROC MIXED DATA = LONG;
CLASS POST POLICY SEX AGE;
MODEL DEPENDENT=POST|POLICY SEX AGE INCOME WORK / SOLUTION;
LSMEANS POST|EXPOSED / DIFF;
ESTIMATE 'D-I-D' EXPOSED*POST 1 -1 -1 1;
RANDOM Int/SUBJECT=PID TYPE=UN ;
RUN;
2. How would I write the command if I want to control for changes in the control variable (incom, work) over time?
You could use AT to control variables whether it is category or continuous.
Here is some example:
24447 - Examples of writing CONTRAST and ESTIMATE statements (sas.com)
Sure. Also @SteveDenham could you an answer .
You could use AT to control variables whether it is category or continuous.
Here is some example:
24447 - Examples of writing CONTRAST and ESTIMATE statements (sas.com)
Sure. Also @SteveDenham could you an answer .
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.