View Full Version : creating new variables in STATA - strange problem


Ymerius
10-28-2008, 02:24 PM
Hello,

I have a very simple stata question.

I have a dataset of counties in the US and also crime rates for four years (panel data)

What I am trying to do is generating a new variable that would be crime rate averages for counties.

So I am typing "sort county" and then "by county: gen av_crime_county=e(crimerate)".

I am getting a new variable, but only missing variables are created... Where am I making a mistake?

It's probably something small and stupid - I took econometrics some time ago and now I am doing a research paper for another course, but I just don't remember some details.

Would it be glad for some help!

Ymerius
10-29-2008, 01:22 PM
is there anybody that could help with my lack of memory of details? I would be extremely glad.

statasas
11-11-2008, 11:22 AM
is there anybody that could help with my lack of memory of details? I would be extremely glad.

Not sure, but I think the variable may not exist in numeric format?