Sorry for the cryptic original message. The problem arises when you have
more than one variable you're using ci on:
. sysuse auto
. statsby "ci price mpg" mean = r(mean) upper = r(ub) lower = r(lb)
foldrange = (r(ub)/r(lb)), by(for)
The output will only show the data for mpg, the price data gets overwritten
before statsby acts on it.
Is there some sort of dataset structure I could use to loop through a series
of variables summarizing them with -ci- and tabulating the r() values?
-----Original Message-----
From: Nick Cox [mailto:[email protected]]
Sent: Monday, September 29, 2003 11:24 AM
To: [email protected]
Subject: st: RE: ci, return lists, and statsby commands
Not clear what the problem is here.
This worked for me:
. sysuse auto
. statsby "ci mpg" N=r(N) mean=r(mean) ub=r(ub) lb=r(lb) , by(rep78)
Nick
[email protected]
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of
> Wallace, John
> Sent: 29 September 2003 18:58
> To: '[email protected]'
> Subject: st: ci, return lists, and statsby commands
>
>
> Dear Statalisters
>
> I'm trying to summarize a dataset using the statsby command
> (with a saving
> option to make a collapsed dataset). Two of the measures
> I'd like to make
> are upper and lower limits for the mean using 95%
> confidence intervals. I
> thought I'd be able to do this by peeking at the
> appropriate values using
> the -return list- command. When I do so, I get nothing, no
> errors, no list.
> Can anyone provide any guidance on this? -Collapse-
> doesn't appear to have
> confidence intervals implemented either.
>
> John Wallace
> Research Associate
> Affymetrix, Inc
> *
> * 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/
*
* 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/