Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: Calculating Averages of Each Observation for Panel Data
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: Calculating Averages of Each Observation for Panel Data
Date
Thu, 24 Nov 2011 19:54:37 +0000
. help collapse
for closest Stata command.
Nick
[email protected]
Andrew Wong Yoon Loong
I am working with panel data that is similar to the following:
Station Year Month V1 V2
1 1990 1 25 25
1 1990 5 60 12
1 1990 7 0 .
1 1991 1 . .
1 1991 6 300 50
2 1990 1 25 25
2 1990 5 60 12
2 1990 7 0 .
2 1991 1 . .
2 1991 6 300 50
Is there a command in Stata that will allow me to calculate the annual
average values for V1 and V2 for each individual station such that I
will get a dataset resembling the one below? Or do I have to manually
calculate using the average() function in Excel?
Station Year V1 V2
1 1990
1 1991
2 1990
2 1991
Regards
Andrew
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/