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

From |
"Katarina Sikavica" <k-sikavica@kellogg.northwestern.edu> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: Variable Manipulation |

Date |
Sat, 1 Mar 2008 19:01:27 +0100 |

Maarten and Kevin: it worked! thank you! > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of > Xiaoheng Zhang > Sent: Saturday, March 01, 2008 6:08 PM > To: statalist@hsphsun2.harvard.edu > Subject: Re: st: Variable Manipulation > > Before you trying to impute missing data, it worth to read > this tutorial on missing data. > > http://www.lshtm.ac.uk/msu/missingdata/start.html > > Kevin > > On 01/03/2008, Maarten buis <maartenbuis@yahoo.co.uk> wrote: > > bys company (year) : gen droa = roa - roa[_n-1] bys company > (year) : > > gen rretind = retind / retind[_n-1] > > > > if you have missings than this will become twice as bad for > these new > > variables: say you have missing in roa in 2000 than droa will be > > missing in 2000 and 2001. So you might want to consider > imputing your > > data first before you do this, using for instance -ice-, > see: -findit > > ice-. > > > > Hope this helps, > > Maarten > > > > --- Katarina Sikavica <k-sikavica@kellogg.northwestern.edu> wrote: > > > > > Dear Statalisters: > > > > > > I am working with a panel dataset containing company performance > > > data and would like to calculate > > > a) the annual change in return on assets (varname: ROA) which is > > > calculated as e.g. ROA in the year 2000 - ROA in 2001 > > > b) the ratio of return index (varname: RETIND), calculated as e.g. > > > RETIND in 2000 / RETIND in 1999 > > > > > > The dataset is a unbalanced panel of company performance data > > > 1998-2005 > > > and contains, unfortunately, quite some missings in the > performance > > > variables (!). The missings are coded using "." The data can be > > > grouped according to company name, year (varname: YEAR) > and a unique > > > numeric > > > identfier(varname: DSCODE) retrieved frot Thomson Anaytics. > > > > > > I have spent some time trying to generate the above mentioned > > > variables (I have tried playing around with _n and _N) but was, > > > unfortunately unable to obtain the correct variable. I > have searched > > > STATA FAQ and have used the findit command but given that I don't > > > even know what the right keyword is I did not find any useful > > > information. > > > I appologize if this procedure has allready been explained > > > elsewhere... > > > > > > Many thanks for your help, > > > Best, > > > Kate > > > > > > > > > * > > > * 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/ > > > > > > > > > ----------------------------------------- > > Maarten L. Buis > > Department of Social Research Methodology Vrije > Universiteit Amsterdam > > Boelelaan 1081 > > 1081 HV Amsterdam > > The Netherlands > > > > visiting address: > > Buitenveldertselaan 3 (Metropolitan), room Z434 > > > > +31 20 5986715 > > > > http://home.fsw.vu.nl/m.buis/ > > ----------------------------------------- > > > > > > ___________________________________________________________ > > Rise to the challenge for Sport Relief with Yahoo! For Good > > > > http://uk.promotions.yahoo.com/forgood/ > > * > > * 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/ > > > > > > > -- > Greetings, > > Xiaoheng Zhang (Kevin) > * > * 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/ > * * 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/

**References**:**st: Variable Manipulation***From:*"Katarina Sikavica" <k-sikavica@kellogg.northwestern.edu>

**Re: st: Variable Manipulation***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**Re: st: Variable Manipulation***From:*"Xiaoheng Zhang" <zhangx@tcd.ie>

- Prev by Date:
**st: Frontier Cost Function** - Next by Date:
**st: Fwd: Frontier Cost Function** - Previous by thread:
**Re: st: Variable Manipulation** - Next by thread:
**st: Frontier Cost Function** - Index(es):

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