Dear Statslisters
I'm currently doing a Diff-in-Diff analysis if the access to micro credit programs helps children of those families spend more time in school each day.
I define a treatment variable as the participation in a credit program, which is called IKP, and I'm interested in those who get treated in the fourth of my four rounds.
So my treatment variable is defined as:
gen treatment=ikp==1 & round==4
I'm able to run an OLS and some FE regression with this without any problems.
Now I want to test the common trend assumption and see if those, who get treated between round 3 and 4 and those, who do not, have the same prior development.
So I try to look at the means of hschool (the variable I'm targeting):
egen school11=mean(hschool) if round==1 & treatment==1
egen school12=mean(hschool) if round==2 & treatment==1
egen school13=mean(hschool) if round==3 & treatment==1
egen school01=mean(hschool) if round==1 & treatment==0
egen school02=mean(hschool) if round==2 & treatment==0
egen school03=mean(hschool) if round==3 & treatment==0
Of course for all the generated variables in the first column Stata tells me there are "no observations", as it is not possible for an observation to be in round 4 and round 1, 2 or 3.
How do I fix that?
Thank you so much for your help!
Best
Arto
I'm currently doing a Diff-in-Diff analysis if the access to micro credit programs helps children of those families spend more time in school each day.
I define a treatment variable as the participation in a credit program, which is called IKP, and I'm interested in those who get treated in the fourth of my four rounds.
So my treatment variable is defined as:
gen treatment=ikp==1 & round==4
I'm able to run an OLS and some FE regression with this without any problems.
Now I want to test the common trend assumption and see if those, who get treated between round 3 and 4 and those, who do not, have the same prior development.
So I try to look at the means of hschool (the variable I'm targeting):
egen school11=mean(hschool) if round==1 & treatment==1
egen school12=mean(hschool) if round==2 & treatment==1
egen school13=mean(hschool) if round==3 & treatment==1
egen school01=mean(hschool) if round==1 & treatment==0
egen school02=mean(hschool) if round==2 & treatment==0
egen school03=mean(hschool) if round==3 & treatment==0
Of course for all the generated variables in the first column Stata tells me there are "no observations", as it is not possible for an observation to be in round 4 and round 1, 2 or 3.
How do I fix that?
Thank you so much for your help!
Best
Arto
Comment