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]

From |
miriam geringer <[email protected]> |

To |
[email protected] |

Subject |
Re: st: Extend observations in dataset |

Date |
Tue, 28 Jan 2014 17:59:51 +0100 |

Sorry, we are different people, working on the same project with a single desktop. Got some confusion here. 2014-01-28 Nick Cox <[email protected]>: > Unless I am misunderstanding something, you appear to be posting as > > Miriam Geiringer > Peter Bilfiger > Torsten Häberle > > Precisely one identity is enough. Masquerading as somebody else is a > breach of trust. > > > > > Nick > [email protected] > > > On 28 January 2014 15:22, Torsten Häberle <[email protected]> wrote: >> I forgot to mention: >> 11111 is the very last observation at the end of the dataset. The >> extension should only be done to this very last observation. >> >> Example: >> >> Number Year Other variable of interest >> 77777 1975 9 >> 22222 1972 8 >> 11111 1999 5 >> >> >> Extension to: >> >> Number Year Other variable of interest >> 77777 1975 9 >> 22222 1972 8 >> 11111 1999 5 >> 11111 2000 . >> 11111 2001 . >> 11111 2002 . >> 11111 1998 . >> 11111 1997 . >> 11111 1996 . >> >> All the observations before should not be extended. They stay exactly >> the same. Only the very last one (11111 in our case). >> >> 2014-01-28 Peter Bilfiger <[email protected]>: >>> I have the following dataset: >>> >>> Number Year Other variable of interest >>> 11111 1999 5 >>> >>> >>> Now, I want to extend the observations so that it looks like this: >>> >>> Number Year Other variable of interest >>> 11111 1999 5 >>> 11111 2000 . >>> 11111 2001 . >>> 11111 2002 . >>> 11111 1998 . >>> 11111 1997 . >>> 11111 1996 . >>> >>> >>> Basically extend the years by +3 and -3 and just copy the number so that for each year, there is the same number from the initial year. The other variables are not important. They can be missing. >>> >>> Can anybody help? > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Extend observations in dataset***From:*Scott Merryman <[email protected]>

**References**:**st: Extend observations in dataset***From:*"Peter Bilfiger" <[email protected]>

**Re: st: Extend observations in dataset***From:*Torsten Häberle <[email protected]>

**Re: st: Extend observations in dataset***From:*Nick Cox <[email protected]>

- Prev by Date:
**st: mixlogit and mixlbeta producing the same results** - Next by Date:
**Re: st: Extend observations in dataset** - Previous by thread:
**Re: st: Extend observations in dataset** - Next by thread:
**Re: st: Extend observations in dataset** - Index(es):