[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
kokootchke <kokootchke@hotmail.com> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: Re: transform observations in variables |

Date |
Mon, 22 Sep 2008 10:06:41 -0400 |

Fabian, I don't know if there's a better way of doing this, but an easy solution is just to use reshape, like Martin suggested, and then merge both datasets by last name. Best, Adrian > Date: Sat, 20 Sep 2008 21:32:56 +0200 > From: Fabian.Brenner@gmx.de > Subject: Re: st: Re: transform observations in variables > To: statalist@hsphsun2.harvard.edu > > Dear Martin, > > Thank you for your help (I corrected the mistakes) but I think reshape is not the right command in my case because I have other data-items in the dataset where I don't want to change the shape (or destroy the allocation). > > So I am looking for a solution to copy observations of "size" in the columns (with a loop?) for each "familyname". > > Thanks, > Fabian > > > > > Martin Weiss schrieb: >> -h reshape- >> >> HTH >> Martin >> _______________________ >> ----- Original Message ----- From: "Fabian Brenner" >> To: >> Sent: Saturday, September 20, 2008 8:38 PM >> Subject: st: transform observations in variables >> >> >>> Dear statalist: >>> >>> My data look like the following: >>> >>> "familiyname" "period" "size" "period1" "period2" "period3" >>> >>> AA 1 8 >>> AA 2 7 >>> AA 3 3 >>> >>> AB 1 2 >>> >>> BG 1 4 >>> BG 2 6 >>> >>> For each "familyname" I want to get the values of "size" in the column with the equivalent "period" (1 to 3). The values of "size" should be written in the column of the equivalent period for all observations of the same "familyname" (that is why I wasn't able to manage it with -if-) >>> >>> The result should be: >>> >>> "familiyname" "period" "size" "period1" "period2" "period3" >>> >>> AA 1 8 8 7 3 >>> AA 2 7 8 7 3 >>> AA 3 3 8 7 3 >>> >>> AB 1 2 2 >>> >>> BG 1 4 4 6 >>> BG 2 6 4 6 >>> >>> I hope someone has a solution or an idea to solve this problem. Thanks in advance! >>> Fabian >>> >>> -- >>> GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion! >>> http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196 >>> * >>> * 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/ >>> >> >> >> * >> * 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/ >> > > -- > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! > Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx > * > * 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/ ________________________________ Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn Now _________________________________________________________________ See how Windows Mobile brings your life together—at home, work, or on the go. http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/ * * 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/

**References**:**st: transform observations in variables***From:*"Fabian Brenner" <Fabian.Brenner@gmx.de>

**st: Re: transform observations in variables***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**Re: st: Re: transform observations in variables***From:*"Fabian Brenner" <Fabian.Brenner@gmx.de>

- Prev by Date:
**st: RE: RE: iid draw from a truncated normal distribution** - Next by Date:
**Re: st: Using A-Weights and Robust Clustered Standard Errors with Suest Command** - Previous by thread:
**Re: st: Re: transform observations in variables** - Next by thread:
**st: Re: transform observations in variables** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |