Dear Stata Comunity,
Basically I want to calculate the mean using an specific range:
first last yr_1990 yr_1991 yr_1992 yr_1993 yr_1994 yr_1995 yr_1996
1990 1994 300 500 600 1000 400 300 100
1995 1996 300 500 600 1000 400 300 100
So the idea is using the variables first and last, calculate the row mean between this period. In this case I need to calculate:
(300+500+600+1000+400)/4=560
And then the next it will be from 1995 to 1996, so
(300+100)/2=200
Any Idea How to calculate this in STATA?
Im trying with rmean, but I dont know how to tell stata to calculate for the range that I need.
Thanks a lot!!!!
CARLOS.
Basically I want to calculate the mean using an specific range:
first last yr_1990 yr_1991 yr_1992 yr_1993 yr_1994 yr_1995 yr_1996
1990 1994 300 500 600 1000 400 300 100
1995 1996 300 500 600 1000 400 300 100
So the idea is using the variables first and last, calculate the row mean between this period. In this case I need to calculate:
(300+500+600+1000+400)/4=560
And then the next it will be from 1995 to 1996, so
(300+100)/2=200
Any Idea How to calculate this in STATA?
Im trying with rmean, but I dont know how to tell stata to calculate for the range that I need.
Thanks a lot!!!!
CARLOS.
Comment