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

st: RE: RE: ci, return lists, and statsby commands


From   "Wallace, John" <John_Wallace@affymetrix.com>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: ci, return lists, and statsby commands
Date   Mon, 29 Sep 2003 14:02:59 -0700

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:n.j.cox@durham.ac.uk] 
Sent: Monday, September 29, 2003 11:24 AM
To: statalist@hsphsun2.harvard.edu
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 
n.j.cox@durham.ac.uk 

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of 
> Wallace, John
> Sent: 29 September 2003 18:58
> To: 'statalist@hsphsun2.harvard.edu'
> 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/



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