Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: Re: Problem with combining sibling data

From   daniel klein <>
To   "" <>
Subject   Re: st: Re: Problem with combining sibling data
Date   Mon, 13 May 2013 11:56:53 +0200

Sounds to me like you just want to add up those variables.

mvdecode <yourvars> ,mv(-1 = .a \ -2 = . b)
g byte foo = <yourvar1> + <yourvar2> + ... + <yourvar4>

where foo is the variable holding the total number of siblings and
<yourvar> is to be replaced with the names of your variables.

Note that all the commands you listed are more or less commands to
analyse the dataset. That is not what you want to do.


>>> 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?

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index