Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Nick Cox <njcoxstata@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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 <yuval.arbel@gmail.com> 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/

**Follow-Ups**:**Re: st: How to generate a vector of the lagged reduction rate the tenant faces, which is different from the current reduction rate?***From:*Yuval Arbel <yuval.arbel@gmail.com>

**References**:**st: How to generate a vector of the lagged reduction rate the tenant faces, which is different from the current reduction rate?***From:*Yuval Arbel <yuval.arbel@gmail.com>

- Prev by Date:
**Re: st: Graphing long data with nested components** - Next by Date:
**Re: st: comparing coefficients using suest (same sample, same DV)** - Previous by thread:
**st: How to generate a vector of the lagged reduction rate the tenant faces, which is different from the current reduction rate?** - Next by thread:
**Re: st: How to generate a vector of the lagged reduction rate the tenant faces, which is different from the current reduction rate?** - Index(es):