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: How to generate a vector of the lagged reduction rate the tenant faces, which is different from the current reduction rate?


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: How to generate a vector of the lagged reduction rate the tenant faces, which is different from the current reduction rate?
Date   Tue, 14 Aug 2012 15:00:34 +0100

See for precisely this problem:

Cox, N.J. 2011. Stata tip 101: Previous but different. Stata Journal
11(3): 472-473.

The heart of the matter is covered in

http://www.stata.com/statalist/archive/2011-01/msg00999.html

Nick

On Tue, Aug 14, 2012 at 1:46 PM, Yuval Arbel <[email protected]> wrote:

> I appreciate very much your assistance in the following question
> (which might save me a lot of time in my research).
>
> I have an unbalanced panel of public-housing tenants. They are offered
> the option to purchase their rental units and face different reduction
> rates from the full apartment price.
>
> Below I provide an example of three tenants (appt ==2851 | appt==2862
> | appt==2906),
>
> My question refers to the reduction rate column. I would like to
> generate a new variable, which reflects the last reduction rate the
> tenant faces, which is different from the current one (or equal to the
> current one in the case that this is the first reduction rate the
> tenant faces).
>
>  For tenant 2906 (for example) the numerical value of this variable
> should be 58.98 for periods 0-4, 59.38 for periods 5-7, 57.89 for
> periods 8-10 etc.
>
> I would like to thank you in advance for your assistance
>
> Yuval
>
> list appt time_index reduct_per fail if appt ==2851 | appt==2862 | appt==2906
>
>         +-----------------------------------+
>         | appt   time_i~x   reduct~r   fail |
>         |-----------------------------------|
>      1. | 2851          0         75      0 |
>      2. | 2851          1         75      0 |
>      3. | 2851          2         75      0 |
>      4. | 2851          3         75      0 |
>      5. | 2851          4         75      0 |
>         |-----------------------------------|

<snip>
*
*   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