Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Accumulating parameter estimates


From   "Garth Rauscher" <[email protected]>
To   <[email protected]>
Subject   st: Accumulating parameter estimates
Date   Mon, 11 Jun 2007 23:10:26 -0500

I have a feeling this is a pretty straightforward issue but cannot figure it
out. I'd like to run a large number of identical models on a large number of
hypothetical datasets (all contained within the master file "statafile" and
identified by a unique ID), while accumulating paremeter estimates and
standard errors into an output dataset. Below is my code, please see the
parts in parentheses-- any help is appreciated.
 

/* RUN THE FIRST MODEL AND CREATE A BASE DATASET FOR APPENDING */

use statafile, clear
keep if id == 1
glm y x [fweight=n], family(binomial) link(identity) noheader

(How to save beta and standard error for X in a "base" dataset?)


/* RUN THE REST OF THE MODELS AND APPEND TO THE BASE */

forvalues i = 2/100{ 

use statafile, clear
keep if id == `i'
glm y x [fweight=n], family(binomial) link(identity) noheader

(How to save beta and standard error for X in a dataset)
(How to append to the base dataset and accumulate rows)

}

 
Thanks.
 
Garth Rauscher
Assistant Professor
SPH Epidemiology and Biostatistics
University of Illinois at Chicago
1603 W Taylor St (M/C/ 923)
Chicago, IL 60612
(312) 413-4317 phone
(312) 996-0064 fax
[email protected] <mailto:[email protected]>  email 

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