Hello All,
I have a panel dataset with 28 years and several U.S. states. Currently, I am trying to create a new 'United States' observation which is the yearly average of other states. I am doing this by first collapsing my data and then appending it to my original dataset. However, I am getting a really weird issue where my collapse command is 'working' but nothing is happening. This is the command I am using:
collapse Cigarette_Cap , by(Year GeoName)
I have no clue what the issue here is ... anyone have any ideas?
EDIT: If I can add, my data collapses when I do by(GeoName) or by(Year) but not when I do both. Is there an issue with how I am defining my varlist?
Thanks,
Mitchell
Related Posts with Problem Collapsing Data
Abnormal return for everday in a yearGood day everybody, I am new to Stata, and came up with an issue regarding the event study. I use t…
Logistic Regression Output with Factor Variable i.Year - Issues with InterpretationHi all! I’m having issues interpreting the coefficients in my regression output. My model has a dic…
What components should I pay attention to when buying a new laptop for Stata?Hello Statalisters, I don't know if I'm allowed to post this thread as it is not related to Stata p…
max # of variables in Cochran's Q test?Hello- I am trying to evaluate multiple choice (non-exclusive) binary questions. Ex: on a survey, a …
How can I get gr_edit to refer to specific graphs when multiple graphs are open in the graph window?I'm using a user-created command (-synth2-) that generates multiple graphs as outputs. I want to be …
Subscribe to:
Post Comments (Atom)
0 Response to Problem Collapsing Data
Post a Comment