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