Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: generating variables with panel data


From   Nico <[email protected]>
To   [email protected]
Subject   st: Re: generating variables with panel data
Date   Thu, 17 May 2007 20:40:36 -0700 (PDT)

Please disregard my previous question - I figured it
out.  But in the event that someone else is curious...

I sorted by id and then subscripted my exchange rate
for the 11th obvservation, which is the year 2000 in
my case:

by id: gen real=exch[11]


As far as I can tell, it worked.


--- Nico <[email protected]> wrote:

> Hello,
> 
> I am sure there is a very simple solution to this
> problem, but I don't know what it is...
> 
> I have a panel of 50 countries, 14 years, with the
> dollar exchange rate being one of the variables. 
> For
> example:
> 
> Australia 1990 austexch1990
> Australia 1991 austexch1991
> Australia 1992 austexch1992
> Peru      1990 peruexch1990
> Peru      1991 peruexch1991
> Peru      1992 peruexch1992
> etc.
> 
> The problem I am having is that I want to generate a
> variable equal to the exchange rate in 2000 for each
> country:
>  
> Australia 1990 austexch2000
> Australia 1991 austexch2000
> Australia 1992 austexch2000
> Peru      1990 peruexch2000
> Peru      1991 peruexch2000
> Peru      1992 peruexch2000
> etc.
> 
> It must be very easy to do, but I don't know how to
> specify it.  I don't believe any of the expressions
> listed in help for 'egen' serve me either.  Any
> suggestions would be appreciated.  
> 
> Thanks,
> Ryan
> 
> 
>        
>
____________________________________________________________________________________Got
> a little couch potato? 
> Check out fun summer activities for kids.
>
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
> 
> 



       
____________________________________________________________________________________Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index