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

From |
ra248@columbia.edu |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Re: How to extract and recode variables in a multiple member household survey |

Date |
Thu, 10 Feb 2005 20:30:39 -0500 |

Dear listers, I apologize for my last posting, as the formating didn't show my data well. This is what I meant: The variables S_i, A_i represent characteristics of household member i. The column Mom gives me the underscored value of where the Mom's characteristics are. For instance, in the first household, the mom's characteristics are S_2 and A_2 cause Mom takes the value 2. In the second household, Mom is in S_1 and A_1... Id Mom S_1 A_1 S_2 A_2 S_3 A_3 ... S_46 A_46 1 2 0 24 0 22 1 12 ... 0 67 2 1 1 29 0 32 0 8 ... . . . . 20 3 1 76 0 75 0 46 ... 1 41 . . What I want to create is the following: Id Mom S_1 A_1 S_2 A_2 S_3 A_3 ... S_46 A_46 SA MA 1 2 0 24 . . 1 12 ... 0 67 0 22 2 1 . . 0 32 0 8 ... . . 1 29 . . 20 3 1 76 0 75 . . ... 1 41 0 46 Friedrich: I did think about it when I started working on this. However what made me decide not to do it is that my analysis will be at the household level; and on top of this my households have too many members. I have households with up to 46 members; so I thought reshape would be too complicated. Specially because I need just a couple of characteristics from the individuals. Again, any help would be greatly appreciated. Regina Almeyda Quoting Friedrich Huebler <huebler@rocketmail.com>: > Regina, > > Have you considered to -reshape- your data? I find survey data > easier > to work with if one observation represents one household member. > You > could then look at these FAQs: > > http://www.stata.com/support/faqs/data/anyall.html > http://www.stata.com/support/faqs/data/members.html > > Friedrich > > --- ra248@columbia.edu wrote: > > I have the following problem. I am working with a household > survey > > and I need to separate the information of the mother. I have a > set > > of variables recording a set of characteristics for each > household > > member. For instance, variable S_i (where i=1,…,46) records the > sex > > of the ith member. Variable A_i records the age of the ith > member > > and so on. I also have a variable that takes the value of i > for > > the mother in the household. > > > > My dataset looks like this: > > > > ID Mom S_1 A_1 S_2 A_2 S_3 A_3… S_46 A_46 > > 1 2 M 24 F 22 F 12 M 67 > > 2 1 F 29 M 32 M 8 . . > > 3 46 F 76 M 75 F 46 F 41 > > . > > . > > > > What I need is to identify the mother in each row and create a > set > > of separate variables for her (i.e. MS, MA), while at the same > > time deleting the original mother observation from the original > > data set of variables (shown below). > > > > > > ID Mom S_1 A_1 S_2 A_2 S_3 A_3… S_46 A_46 > MS MA > > 1 2 M 24 . . F 12 M 67 F 22 > > 2 1 . . M 32 M 8 . . F 29 > > 3 46 F 76 M 75 F 46 . . F 41 > > > > > __________________________________ > Do you Yahoo!? > All your favorites on one personal page – Try My Yahoo! > http://my.yahoo.com > * > * For searches and help try: > * http://www.stata.com/support/faqs/res/findit.html > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: Re: How to extract and recode variables in a multiple member household survey***From:*Friedrich Huebler <huebler@rocketmail.com>

**References**:**st: Re: How to extract and recode variables in a multiple member household survey***From:*Friedrich Huebler <huebler@rocketmail.com>

- Prev by Date:
**st: Re: How to extract and recode variables in a multiple member household survey** - Next by Date:
**st: How to svyset for the SIPP** - Previous by thread:
**st: Re: How to extract and recode variables in a multiple member household survey** - Next by thread:
**st: Re: How to extract and recode variables in a multiple member household survey** - Index(es):

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