Bookmark and Share

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]

Re: st: Maximum value for a variable


From   [email protected]
To   [email protected]
Subject   Re: st: Maximum value for a variable
Date   Tue, 22 Mar 2011 18:58:24 +0100

Sorry Ajjee,
may be there's something I'm missing. Can't you get the results you're looking for by just using the commands "egen" (and then "max"), "bysort" (to do it for each country) and "in" (if data are sorted by year) or "if" (to put a condition on the year)?
Federico 


> Dear All
> 
> I have a panel dataset over the period 1960-2010 for 30 
> countries. I want to
> compute the maximum value for a variable over the last 15 years 
> for each
> country. For example, for Austria, I want to compute the max of 
> gdp growth
> from 1984-1999 for the year 1999 and 1985-2000 for the year 2000 
> and so on.
> Please help.
> 
> 
> Regards,
> 
> ajjee
> 
> --
> View this message in context: 
> http://statalist.1588530.n2.nabble.com/Maximum-value-for-a-
> variable-tp6197245p6197245.html
> Sent from the Statalist mailing list archive at Nabble.com.
> *
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index