Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st:re:re: if-sentences in Stata


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st:re:re: if-sentences in Stata
Date   Fri, 28 Nov 2008 12:30:12 -0500

Linn--
One subtle but important point: the lag operator is not the same as
explicit subscripting when there are gaps, so sometimes you want L.x
and sometimes you want x[_n-1] but usually the former is safer and
better, and you can always get a construct like x[_n-1] with a lag
operator by defining a new time index as _n.  As far as I know, the
only real advantage of explicit subscripting is that you can use other
variables in the square brackets.

On Fri, Nov 28, 2008 at 10:54 AM, Kit Baum <[email protected]> wrote:
> <>
> Linn said
>
> 1) When you type L.flow is that referring to the
> Value in cell [_n-1]?
>
> (1) yes.
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index