I have the Syntax of did_imputation is as below
Array
I am wondering how to create the variable Ei.
In my case, the unique unit id is "TYPE2"
For example, I have three countries in my sample, US implement is 1995, UK implement in 1997, and Jordan never treat.
So, I think of
gen ei=1995 if GEOGN2=="US"
gen ei=1997 if GEOGN2=="UK"
gen ei=. if GEOGN2=="Jordan"
Is it correct?
Related Posts with How to create a varaible based on each value of existing variable in did_imputation?
how to export Summary Statistics to wordDear Sir/Madam I am working on my thesis on impact of informal credit on household welfare. I try to…
Marginal effect after heckpoissonDear All, I am new to stata and I am using Heckpoisson, a poison regression model with endogenous s…
Numbering occurrences of a flag within patients.In the example below I have created OVERLAP_FLAG, which is equal to 1 where two consecutive regimens…
Generate a new variable in a loop in different files and calculating the meanHi, I want to write a loop to generate a new variable called savings (income-expenditure) in two se…
Adding partner data to responding person data in a panel data fileI wish to extend my analysis of panel data to include information about the responding person's part…
Subscribe to:
Post Comments (Atom)
0 Response to How to create a varaible based on each value of existing variable in did_imputation?
Post a Comment