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]

From |
daniel klein <klein.daniel.81@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 14:49:27 +0200 |

Annabel sent a follow up question to me privately. The FAQs clearely state that in general you shoud not do so (http://www.stata.com/support/faqs/resources/statalist-faq/#private). I will try and answer as good as I can. If -1 and -2 represent missing values of some kind, it seems natural to exclude those from the calculation (that is before or while adding the variables up). You can do so using -mvdecode- (see my first reply), -recode-, -replace-, or some technique as demonstaretd in Nick's reply. I do not underrstand why you want to only exclude -2 from the calculations, as you already correctly noted, that we cannot "be sure of what [any of the negative values] mean", in terms of the "true" (underlying) value. Best Daniel -- Thanks. Sorry, Yes my first variable was using simple addition "+", i.e. gen sib = var1 + var2 + var3 + var4 .... I suppose what I should really have enquired about is how I deal with the -1 and -2 because that was really what worries me, so adding up the variables gives you this table. siblings_16 Freq. Percent Cum. -8 470 4.05 4.05 -6 8 0.07 4.12 -5 61 0.53 4.64 -4 5,669 48.81 53.45 -3 154 1.33 54.77 -2 260 2.24 57.01 -1 332 2.86 59.87 0 588 5.06 64.93 1 2,118 18.24 83.17 2 1,189 10.24 93.41 3 434 3.74 97.14 4 332 2.86 100.00 Total 11,615 100.00 It is my concern over what - 1 to -8 now mean. So clearly -8 is 4 of the -2's but how can I be sure of what the others mean... Can you use the simple addition generator whilst keeping the original label/ code, so ask it to add but all those that are labelled -2 are left out of the addition? Otherwise, I'll just recode what it produces but I fear what I might miss/ misuse. Best Wishes 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/

- Prev by Date:
**Re: st: complicated twoway graph** - Next by Date:
**Re: st: Re: Problem with combining sibling data** - Previous by thread:
**Re: st: Re: Problem with combining sibling data** - Next by thread:
**Re: st: Re: Problem with combining sibling data** - Index(es):