Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Philip Burgess <philip.burgess.uq@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Outputs as inputs – how to efficiently process a series of routines? |

Date |
Tue, 31 Aug 2010 18:00:30 +1000 |

This is a data management question rather than a statistical issue.... I have a dataset which is stratified by 4 variables: 1. Sample - kids, adults, or older persons; 2. Year - 2006, 2007, 2008 or 2009; 3. Treatment setting - inpatient, residential or ambulatory; 4. Status - baseline, follow-up or change. Thus, the overall structure is a 3 x 4 x 3 x 3 = 108 unique strata. The outcome variable is usually a summary score and I need to estimate various statistics (say mean, SD, percentiles) for each of the strata; and I also need to estimate the internal consistency of the outcome measure with Cronbach's Alpha. I need to use the estimated statistic(s) as 'input' in a variety of other calculations (e.g., calculate overall Effect Size using the mean, the SD; other calculations require Alpha). I know these statistics are available immediately after execution - I can get these using the command - return list - . After that, I can generate a new variable - gen double alpha = r(alpha)- and then run - collapse (first) alpha - to get the required statistic(s). The problem is that I have 108 strata and whereas I can 'manually' code each of these variants (and save as temp files, then - append – all 108 to save a single file - this is both inefficient and the risk of error (i.e., me!) is high. Is there a way around this? I should add that I have mainly used SPSS for these kinds of data management issues. Theoretically, using SPSS commands that ‘split’ the data file by the required partitions and then using its Output Management System will achieve the required output. This used to work with earlier versions but not the current release – hence my efforts with Stata. So, I know my issue is less relevant to the general discussions on the list – my apologies. Thoughts? Thanks; Philip * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE: Outputs as inputs - how to efficiently process a series of routines?***From:*Nick Cox <n.j.cox@durham.ac.uk>

- Prev by Date:
**Re: st:about the fixed-effects model** - Next by Date:
**Re: st:about the fixed-effects model** - Previous by thread:
**st:about the fixed-effects model** - Next by thread:
**st: RE: Outputs as inputs - how to efficiently process a series of routines?** - Index(es):