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: Calculating SD of a variable
From
lreine ycenna <[email protected]>
To
[email protected]
Subject
st: Calculating SD of a variable
Date
Fri, 20 May 2011 11:45:35 +0100
Hello,
I have a list of countries and their annual GDP growth rates. I need
to calculate the standard deviations of the growth rate. But I seem to
have done it wrong:
Using the command egen sd = sd(gdp) gives me the same number for the
entire column
Using egen sd= sd (gdp), by(countryno year) gives me missing values.
Am I missing something?
My panel data looks like this:
countryno year gdp
122 1995 1.448922432
122 1996 1.802327838
122 1997 1.939189289
122 1998 3.486108757
122 1999 3.057156394
122 2000 3.403232592
122 2001 0.706544087
122 2002 0.572674299
122 2003 0.806288363
122 2004 2.143516615
122 2005 2.0000
122 2006 3.021230987
124 1970 6.058892112
124 1971 3.1155209
124 1972 4.699826137
124 1973 6.212549621
124 1974 4.21133101
124 1975 -2.174872486
124 1976 5.612220928
124 1977 0.585991929
124 1978 2.844723097
etc..
*
* 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/