Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: codebook with percentages


From   "Paul Bern" <[email protected]>
To   <[email protected]>, <[email protected]>
Subject   Re: st: codebook with percentages
Date   Wed, 26 Jan 2005 13:49:09 -0500

Hi,

The -codebook2- command may have what you want -or at least close to
it.  You'll also need -vartyp- to go along with it.

Paul





********************************************************************************************************
Paul H. Bern, Ph.D.
Numeric Data Services Librarian         The only thing worse than not
352 Bird Library                                       getting what you
wanted
222 Waverly Ave.                                    is getting what you
asked for.
Syracuse, NY 13244
315-443-1352
http://libwww.syr.edu/information/mgi/nds

>>> [email protected] 1/11/2005 10:03:51 AM >>>
I am trying to write a codebook, containing the variable name,
variable
label and the frequency, percent, percent of nonmissing values, value,
and
label of each value.

I would like to have something like this:

q1 state of economy
------------------------------------------------------------------
Value Label Frequency Percent Per(nonm) Cum
------------------------------------------------------------------
1 gotten better 117 6.46% 6.90% 6.46%
2 stayed the same 472 26.08% 27.83% 32.54%
3 gotten worse 1107 61.16% 65.27% 93.70%
. 114 6.30% 100.00%
------------------------------------------------------------------
  1810 100.00% 100.00%

I've tried the commands codebook- and -cb2html-, but codebook- only 
displays value, label and frequency and -cb2html- additionally displays

percentages, but not the percentage of nonmissings and cumulative 
percentages. Ideally I would like to have displayed the percentages of
all 
"valid" categories, where "valid" could be defined as(say) q*<90.

I could get these by using tab- for all variables and copy it, but I
was
wondering if there is a way to do this automatically.

Any help is greatly appreciated.

Thomas


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html 
*   http://www.stata.com/support/statalist/faq 
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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