Dear community,
I am working on a panel data analysis, where I have to generate a treatment variable. The panel data only covers two waves of household data, one from 2019 and one from 2022.
The treatment variable should indicate that at least one household member was contracted with Covid-19. The problem is that my treatment dummy only indicates the value of one for the year 2022 but not for the same subject in 2019.
The commands I used so far are:
gen time = 1 if year==2022,
replace time = 0 if year==2019,
xtset QID time
gen treated= 1 if cov_infected_cov!=0,
replace treated = 0 if cov_infected_cov==0
I would be very thankful for any advice to fix this problem.
Best regards!
Related Posts with Generate treatment variables for panel data analysis
Creating an equity risk premiumI have a data set with the following variables: S & P 500 Returns 3-month T-bill returns 10-y…
Significant coefficient in logistic regression, but overlapping marginsDear members, I am running a logistic regression of a binary variable on a set of independent varia…
Hausman Test resultArray This is the output of my Hausman test.. what does it mean by model fitted on these data do…
Question on putpdfHi, guys, I have a question on putpdf command. I am putting the graph I generated into two pdf sepa…
Heteroskedasticy in Ordered Probit Model: does heteroprob command solves the problem? How?Question correction: Sorry! I meant to say "hetoprobit", not "heteroprobit" Hi! I'm conducting an…
Subscribe to:
Post Comments (Atom)
0 Response to Generate treatment variables for panel data analysis
Post a Comment