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]

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 <[email protected]>
To   statalist <[email protected]>
Subject   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:46:27 +0300

Dear Statalist Members,

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 |
        |-----------------------------------|
     6. | 2851          5         75      0 |
     7. | 2851          6         75      0 |
     8. | 2851          7         75      0 |
     9. | 2851          8         75      0 |
    10. | 2851          9         75      0 |
        |-----------------------------------|
    11. | 2851         10         75      0 |
    12. | 2851         11         75      0 |
    13. | 2851         12         75      0 |
    14. | 2851         13         75      0 |
    15. | 2851         14         75      0 |
        |-----------------------------------|
    16. | 2851         15         90      0 |
    17. | 2851         16         90      0 |
    18. | 2851         17         90      0 |
    19. | 2851         18         90      0 |
    20. | 2851         19         90      0 |
        |-----------------------------------|
    21. | 2851         20         90      0 |
    22. | 2851         21         90      0 |
    23. | 2851         22         90      0 |
    24. | 2851         23         90      0 |
    25. | 2851         24         90      0 |
        |-----------------------------------|
    26. | 2851         25         90      0 |
    27. | 2851         26         90      0 |
    28. | 2851         27         90      1 |
    29. | 2862         71          0      0 |
    30. | 2862         72          0      0 |
        |-----------------------------------|
    31. | 2862         73          0      0 |
    32. | 2862         74          0      0 |
    33. | 2862         75          0      0 |
    34. | 2862         76          0      0 |
    35. | 2862         77          0      0 |
        |-----------------------------------|
    36. | 2862         78          0      0 |
    37. | 2862         79          0      0 |
    38. | 2862         80          0      0 |
    39. | 2862         81          0      0 |
    40. | 2862         82          0      0 |
        |-----------------------------------|
    41. | 2862         83          0      0 |
    42. | 2862         84          0      0 |
    43. | 2862         85          0      0 |
    44. | 2862         86          0      0 |
    45. | 2862         87          0      0 |
        |-----------------------------------|
    46. | 2862         88          0      0 |
    47. | 2862         89          0      0 |
    48. | 2862         90          0      0 |
    49. | 2862         91          0      0 |
    50. | 2862         92          0      0 |
        |-----------------------------------|
    51. | 2862         93          0      0 |
    52. | 2862         94          0      0 |
    53. | 2862         95          0      0 |
    54. | 2862         96         25      0 |
    55. | 2862         97         25      0 |
        |-----------------------------------|
    56. | 2862         98         25      0 |
    57. | 2862         99         25      0 |
    58. | 2862        100         25      0 |
    59. | 2862        101         25      0 |
    60. | 2862        102         25      0 |
        |-----------------------------------|
    61. | 2862        103         25      0 |
    62. | 2862        104         25      0 |
    63. | 2862        105         25      0 |
    64. | 2862        106         25      0 |
    65. | 2862        107         25      1 |
        |-----------------------------------|
    66. | 2906          0      58.98      0 |
    67. | 2906          1      58.98      0 |
    68. | 2906          2      59.38      0 |
    69. | 2906          3      59.38      0 |
    70. | 2906          4      59.38      0 |
        |-----------------------------------|
    71. | 2906          5      57.89      0 |
    72. | 2906          6      57.89      0 |
    73. | 2906          7      57.89      0 |
    74. | 2906          8      56.63      0 |
    75. | 2906          9      56.63      0 |
        |-----------------------------------|
    76. | 2906         10      56.63      0 |
    77. | 2906         11      59.03      0 |
    78. | 2906         12      59.03      0 |
    79. | 2906         13      59.03      0 |
    80. | 2906         14      58.55      0 |
        |-----------------------------------|
    81. | 2906         15          0      0 |
    82. | 2906         16          0      0 |
    83. | 2906         17          0      0 |
    84. | 2906         18          0      0 |
    85. | 2906         19          0      0 |
        |-----------------------------------|
    86. | 2906         20          0      0 |
    87. | 2906         21          0      0 |
    88. | 2906         22          0      0 |
    89. | 2906         23          0      0 |
    90. | 2906         24          0      0 |
        |-----------------------------------|
    91. | 2906         25          0      0 |
    92. | 2906         26          0      0 |
    93. | 2906         27          0      0 |
    94. | 2906         28          0      0 |
    95. | 2906         29          0      0 |
        |-----------------------------------|
    96. | 2906         30          0      0 |
    97. | 2906         31          0      0 |
    98. | 2906         32          0      0 |
    99. | 2906         33          0      0 |
   100. | 2906         34          0      0 |
        |-----------------------------------|
   101. | 2906         35          0      0 |
   102. | 2906         36          0      0 |
   103. | 2906         37          0      0 |
   104. | 2906         38          0      0 |
   105. | 2906         39          0      0 |
        |-----------------------------------|
   106. | 2906         40          0      0 |
   107. | 2906         41          0      0 |
   108. | 2906         42          0      0 |
   109. | 2906         43          0      0 |
   110. | 2906         44          0      0 |
        |-----------------------------------|
   111. | 2906         45          0      0 |
   112. | 2906         46          0      0 |
   113. | 2906         47          0      0 |
   114. | 2906         48          0      0 |
   115. | 2906         49          0      0 |
        |-----------------------------------|
   116. | 2906         50          0      0 |
   117. | 2906         51          0      0 |
   118. | 2906         52          0      0 |
   119. | 2906         53          0      0 |
   120. | 2906         54          0      0 |
        |-----------------------------------|
   121. | 2906         55          0      0 |
   122. | 2906         56          0      0 |
   123. | 2906         57          0      0 |
   124. | 2906         58          0      0 |
   125. | 2906         59          0      0 |
        |-----------------------------------|
   126. | 2906         60          0      0 |
   127. | 2906         61          0      0 |
   128. | 2906         62          0      0 |
   129. | 2906         63          0      0 |
   130. | 2906         64          0      0 |
        |-----------------------------------|
   131. | 2906         65          0      0 |
   132. | 2906         66          0      0 |
   133. | 2906         67          0      0 |
   134. | 2906         68          0      0 |
   135. | 2906         69          0      0 |
        |-----------------------------------|
   136. | 2906         70          0      0 |
   137. | 2906         71         60      0 |
   138. | 2906         72         60      0 |
   139. | 2906         73         60      0 |
   140. | 2906         74         60      0 |
        |-----------------------------------|
   141. | 2906         75         60      0 |
   142. | 2906         76         60      0 |
   143. | 2906         77         60      0 |
   144. | 2906         78         60      0 |
   145. | 2906         79         60      0 |
        |-----------------------------------|
   146. | 2906         80         60      0 |
   147. | 2906         81         60      0 |
   148. | 2906         82         60      0 |
   149. | 2906         83         60      0 |
   150. | 2906         84         60      0 |
        |-----------------------------------|
   151. | 2906         85         60      0 |
   152. | 2906         86         60      0 |
   153. | 2906         87         60      0 |
   154. | 2906         88         60      0 |
   155. | 2906         89         60      0 |
        |-----------------------------------|
   156. | 2906         90         60      0 |
   157. | 2906         91         60      0 |
   158. | 2906         92         60      0 |
   159. | 2906         93         60      1 |
        +-----------------------------------+

.


-- 
Dr. Yuval Arbel
School of Business
Carmel Academic Center
4 Shaar Palmer Street,
Haifa 33031, Israel
e-mail1: [email protected]
e-mail2: [email protected]
*
*   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