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

st: a "byable" cii

To   "''" <>
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?

*   For searches and help try:

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