Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"PHAM Ngoc Minh" <pham@ri.ncgm.go.jp> |

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

Subject |
RE: st: intcens: how to estimate mean and variance after intcens |

Date |
Fri, 26 Oct 2012 13:22:05 +0900 |

Dear Stata users, I wish to create dummy variables containing missing (.), and thus used formula COND(IF, THEN, ELSE) but missing (.) no longer existed. An example as follows: I need to generate (wcgrp) from waist circumference (wc) as 1, 0 or missing (.), then typed: generate wcgrp = cond(wc>90&wc!=.&sex==1|wc>80&wc!=.&sex==2, 1, 0) but (wcgrp) had only 1 and 0, and missing was regarded as 0. Then, I tried generate wcgrp = cond(wc>90&wc!=.sex==1|wc>80"wc!=.&sex==2, 1, 0, .), but nothing changed. Are my commands correct? Anyone knows the solution, please give your help. Thank you Ngoc Minh Pham, Research associate National Center for Global Health and Medicine, Japan. pham@ri.ncgm.go.jp * * 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/

**References**:**st: intcens: how to estimate mean and variance after intcens***From:*Yoann Madec <yoann.madec@pasteur.fr>

**Re: st: intcens: how to estimate mean and variance after intcens***From:*Steve Samuels <sjsamuels@gmail.com>

**Re: st: intcens: how to estimate mean and variance after intcens***From:*Yoann Madec <yoann.madec@pasteur.fr>

**Re: st: intcens: how to estimate mean and variance after intcens***From:*Steve Samuels <sjsamuels@gmail.com>

- Prev by Date:
**Re: st: intcens: how to estimate mean and variance after intcens** - Next by Date:
**using -cond- to create a indicator [was: Re: st: intcens: how to estimate mean and variance after intcens]** - Previous by thread:
**Re: st: intcens: how to estimate mean and variance after intcens** - Next by thread:
**Re: st: intcens: how to estimate mean and variance after intcens** - Index(es):