Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Re: Problem with combining sibling data


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Re: Problem with combining sibling data
Date   Mon, 13 May 2013 10:51:32 +0100

What is "sibling shape"? More generally, what precisely do the data
look like and precisely what code did you try and precisely why did
not that code do what you want? Otherwise this is only marginally
different from "my code doesn't do what I want".

On the face of it,

total number of siblings = number older + number younger

and so forth, so "+" appears to be all the Stata you need here.

generate nsiblings = nyounger + nolder

and variations on the same theme.

Nick
njcoxstata@gmail.com


On 13 May 2013 10:36, Annabel Mullin <ajcmullin@yahoo.com> wrote:
>>> Hi,
>>>
>>> I am keen to try and create a total sibling variable for data that I have that is currently separated out into four vars:
>>> no.of brother-sister in same house older,
>>> no.of brother-sister in same house younger
>>> no.of brother-sister outside house older
>>> no.of brother-sister outside house younger
>>
>>> for each 0-4 = number siblings and -1 is missing questionnaire and -2 is not stated
>>>
>>> This is from a longitudinal cohort study and I'm being dense but can't seem to create a variable that gives me the sibling shape of each cohort member - I have used sum, count, total but they're not an accurate portrayal of the siblings that each cohort member has.
>>>
>>> What can you recommend?
>>>
>>> Thank you
>>> Annabel
>>
>
>
> *
> *   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index