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

RE: st: A question regarding parmby

From   Maarten buis <>
Subject   RE: st: A question regarding parmby
Date   Tue, 3 Jan 2006 08:45:23 +0000 (GMT)

A. Jalal wrote:
> I am trying to use the parmby command to retrieve the results 
> of a number of regressions I am running. The command I am 
> using:
> parmby "qui sureg (Y XA) (Y XB)", by(group) es(N) label command
> norestore saving(Equation1.dta, replace) 
> I need to save the R-squares and the Chi-squares from each of 
> the regressions. However, I have no idea how to get them. I
> have tried the evec command, but without any success. 

the reason why the evec option did not work is that sureg does not save the R-squares and
Chi-squares as a vector. If you first estimate the sureg model and than type -ereturn list- you
get all the information sureg saves. Than you can build the -parmby- command, like the example

*------------begin example--------------
sysuse auto, clear
sureg (price weight length) (mpg weight)
ereturn list
parmby "qui sureg (price weight length) (mpg weight)" /*
   */,by(foreign) es(N chi2_1 r2_1 chi2_2 r2_2) label command norestore
*------------end example---------------


Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214

+31 20 5986715

To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
*   For searches and help try:

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