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 |
Phil Schumm <pschumm@uchicago.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: "table" showing summary of ~100 ternary variables? |

Date |
Sat, 30 Oct 2010 16:21:50 -0500 |

On Oct 30, 2010, at 3:13 PM, Phil Schumm wrote:

Now, we'll compute the proportion correct (as a proportion of values1-3) for each variable:egen correct = max((y==1)*cnt), by(Var) egen nonmiss = sum(inlist(y,1,2,3)*cnt), by(Var) bys Var (y): replace cnt = correct[1] / nonmiss[1] if y == 5

replace cnt = correct / nonmiss if y == 5

-- Phil * * 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/

**References**:**st: "table" showing summary of ~100 ternary variables?***From:*Michael Costello <michaelavcostello@gmail.com>

**Re: st: "table" showing summary of ~100 ternary variables?***From:*Phil Schumm <pschumm@uchicago.edu>

- Prev by Date:
**re: Re: Re: st: gaps in the Hodrick-Prescott filter** - Next by Date:
**st: Data management: lowest value for which some condition is met** - Previous by thread:
**Re: st: "table" showing summary of ~100 ternary variables?** - Next by thread:
**RE: st: "table" showing summary of ~100 ternary variables?** - Index(es):