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

From |
Kit Baum <baum@bc.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Re: percent of time a |

Date |
Wed, 11 Feb 2009 07:05:44 -0500 |

<> Easy: for a continuous variable the probability that X_i = x is zero. Kit Baum, Boston College Economics and DIW Berlin http://ideas.repec.org/e/pba1.html An Introduction to Modern Econometrics Using Stata: http://www.stata-press.com/books/imeus.html On Feb 11, 2009, at 02:33 , Howie wrote:

Is there a command that will give me the proportion of the time avariable is equal to a certain value? The command must acceptweights. I'm looking for something like -tabcond-, from SSC, butthat returns proportions as well as counts.One option would be to -generate- a dummy equal to 1 when myvariable is equal to my value and zero otherwise and then to use -svy: mean-, but I would prefer something that can be done in oneline (and without generating a new variable). My variable iscontinuous, so I don't want to -svy: tab- the whole thing.

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE: Re: percent of time a***From:*Howard Lempel <HLempel@brookings.edu>

- Prev by Date:
**Re: st: Estimating rare event logistic model (Relogit) with instrumental variable** - Next by Date:
**st: Common legend with -graph combine-** - Previous by thread:
**st: Latent variable DVs in gllamm** - Next by thread:
**st: RE: Re: percent of time a** - Index(es):

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