Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Average value for a certain range


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Average value for a certain range
Date   Thu, 18 Mar 2004 21:27:51 -0000

egen meangdp = mean(gdp) if inrange(year,1963,1980), 
	by(country)

Nick 
n.j.cox@durham.ac.uk 

Kakatua Kutta
 
> I have a panel data which contains suppose, 50 countries gdp 
> from year 1950 to 2000. Now for each country I would like to 
> create a variable which measures the avergae  gdp for a 
> certain range of year, say from 1963 to 1980.I have gone 
> through the manuals and archives without any clue.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index