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

st: a "byable" cii


From   VISINTAINER PAUL <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: a "byable" cii
Date   Thu, 6 Feb 2003 15:05:26 -0500

I was recently asked to compute confidence intervals for several proportions
(more than 100).  The data came in a spreadsheet in two columns: numerator
(num) and denominator (den).  I thought I could quickly run them using
either ci or cii.  However, it appears that ci doesn't read summary data and
cii is not "byable".  Despite my best efforts, I couldn't devise a program
that would read more than the first line of the data.  

My very inelegant solution to the problem was this:  I converted the two
columns of data into a single row of data with 200 columns:  (e.g., num1
num2 . . . num100 den1 den2 . . . den100).

Then I ran the following program:

	forvalues x=1/100 {
	  cii den`x' num`x'
	}

While it worked, it was really cumbersome converting the data.  I suspect
(hope) there is an easier way to do this.  Any suggestions?

-p
*
*   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