Statalist


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

st: RE: Compiling results


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: Compiling results
Date   Fri, 22 Aug 2008 15:31:06 +0200

-ssc d parmest-

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Levy, Douglas E.,
Ph.D.
Sent: Friday, August 22, 2008 3:21 PM
To: [email protected]
Subject: st: Compiling results

Hi all,
I want to streamline the collection of a large number of results.
Specifically,
I'd like to create a dataset that collects the results from regression
models
with different functional forms for different subsets of the data, all while
keeping track of the types of models used. 

For example:
foreach i of numlist 1/5 {
   glm Y X W, l(log) f(gamma) if agecat=`i' /*adjusted model*/
   glm Y X, l(log) f(gamma) if agecat=`i' /*unadjusted model*/
   glm Y X W, l(power .5) f(gauss) if agecat=`i' /*adjusted model*/
   glm Y X, l(power .5) f(gauss) if agecat=`i' /*unadjusted model*/
   }

I would like to keep track of the results in a dataset as follows:

agecat link family _b[X]adjusted _b[X]unadjusted
1 log gamma .24334  .63543
1 power.5 gauss .43424 .98783
..
5 log gamma .345543  .6456
5 power.5 gauss .54353 .98978

If the results were all numerical, I could compile them in a matrix.
However,
some of the info in this results dataset is in string format, e.g. "gauss".
Any
suggestions on an efficient, automatic way to collect all this information
in
one place? Thanks for any and all advice.
Best,
Doug

Douglas Levy, PhD
Institute for Health Policy
Massachusetts General Hospital
50 Staniford Street; Suite 901
Boston, MA 02114
Tel 617.643.3595
Fax 617.724.4738


The information transmitted in this electronic communication is intended
only
for the person or entity to whom it is addressed and may contain
confidential
and/or privileged material. Any review, retransmission, dissemination or
other
use of or taking of any action in reliance upon this information by persons
or
entities other than the intended recipient is prohibited. If you received
this
information in error, please contact the Compliance HelpLine at 800-856-1983
and
properly dispose of this information.




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


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



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