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

st: Re: 'lag' of a string variable


From   baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: 'lag' of a string variable
Date   Thu, 04 Jul 2002 11:26:03 -0400


--On Thursday, July 4, 2002 2:33 -0400 statalist-digest <owner-statalist@hsphsun2.harvard.edu> wrote:


   In my dataset there is a variable v1, which is a string variable. I
try to use l.v1, after i set the time variable (eg, tsset time). I don't
know why stata do not permit timeseries operators on string variables, it
seems not reasonable for the lag or lead operators, beyond the difference
operators

i wonder if there is some sort way so that i can use the laged string
variable?
Why not just v1[_n-1] ? Apart from missing values in the time domain, that will do the same thing.

Kit Baum
*
* 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