Hello All,
I am trying to create a synthetic control group using Stata's 'synth' package but when I enter the code:
tsset GeoFips Year
synth Ethanol_cap21 GDPcap(1970(1)1979) Population_age21 Alcohol_CPI Ethanol_cap21(1979) Ethanol_cap21(1970) Ethanol_cap21(1975), trunit(3) trperiod(1980)
I get the following error:
treated unit not found in panelvar - check tr()
After some research, I am aware that this issue is due to my panelvar GeoFips not taking values 1 - x. I confirmed this using the levelsof command and got the following:
levelsof GeoFips
0 1000 2000 4000 5000 6000 8000 9000 10000 11000 12000 13000 15000 16000 17000 18000 19000 20000 21000 22000 23000 24000 25000 26000 27000 28000 29000 30000 310
> 00 32000 34000 35000 36000 37000 38000 39000 40000 41000 42000 44000 45000 46000 47000 48000 49000 50000 51000 53000 54000 55000 56000.
Can anyone provide some insight on how to recode this variable so that it takes values 1,2,3, etc?
Thanks
Related Posts with How to change the 'levelsof' a panel variable?
Simple Bar Graph - Having TroubleHI There, I am looking to put together a simple bar graph that gives me the count of the number tim…
putting data into stata and using years as dummy variablesI am relatively new to stata however i have collected data from the LCF survey on the years 2007-201…
Estimation problemsHello dear Stata netizens. I am a PhD student in economics. The tests carried out revealed the prese…
cureregr: post-estimation problem predicting hazardsWhat is the problem: I am using the post-estimation 'predict' command to estimate the hazard rates f…
Finite Mixture Model (FMM) with discrete and continuous partDear Statalist, I have observations in the intervall [0,1] with two modes at 0 and 1. I want to mod…
Subscribe to:
Post Comments (Atom)
0 Response to How to change the 'levelsof' a panel variable?
Post a Comment