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

st: extracting results of analysis into new variables


From   "Keith Farnsworth" <keithf@memo.dundee.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: extracting results of analysis into new variables
Date   Mon, 18 Nov 2002 11:54:30 -0000

Hi,
I have a large set of short time-series (one for each patient) of about 2000 patients. The patient is identified by a record number rc and the time series data point by pnt. I have used 

sort rc pnt
by rc : regress dt lv

to obtain a lin. regression for each patient (as an example - the real thing will use non-linear regression). 

I am interested in the results of all these little regressions (coefficients, P values and Rsquared). My question is - can I extract these from the regression results (which go to the screen) in order to put them in a new variable. The aim is to summarise each patient's time series using the results of their regression model. 

Like this: 

Patient   Rsquare  const P coef P  


Is this possible? Or do I have to write the regression method explicitly (ie not using regress)? 

Thanks to all.

Keith Farnsworth (Epidemiologist - Dundee University, Scotland).
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index