Date: Tue, 24 Feb 1998 12:02:35 -0800
Reply-To: Roy Pardee <roy@U.ARIZONA.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Roy Pardee <roy@U.ARIZONA.EDU>
Organization: University of Arizona
Subject: Re: Fit 2 Models with 1 PROC REG, possible ?
Content-Type: text/plain; charset=us-ascii
You can have multiple MODEL statements in the same call to REG. So...
PROC REG DATA=ANTONIO OUTSET=OUT1 NOPRINT ;
MODEL Y= X1 X2 X3 ;
MODEL Y= X2 X4 ;
BY ID ;
Note though, that observations with missing values on ANY of the
variables will be excluded from all analyses (that is, an observation
with a missing value for X4 will not be included in the first model,
even though X4 isn't part of that first model).
Gratuitous comment: check out the _Enhancements_ book for extra model
statistics to output that you might be interested in (like adjusted R^2s
and SEBs for instance).
Antonio Wong wrote:
> Hi all,
> Suppose I have a data set ANTONIO with 6 variables:
> ID Y X1 X2 X3 X4
> I have the following 2 procedures.
> PROC REG DATA=ANTONIO OUTSET=OUT1 NOPRINT;
> MODEL Y= X1 X2 X3;
> BY ID;
> PROC REG DATA=ANTONIO OUTSET=OUT2 NOPRINT;
> MODEL Y= X2 X4;
> BY ID;
> I want to combine these two procedures into one so that I can mainpulate
> 1 OUTSET instead of 2. Is that possible ? I hope someone are so kind to
> email me the solution.
> Thanks and best regards,
| Roy Pardee, J.D., M.A.
| Psychology & Law Student | The difference between science
| University of Arizona | advocacy is that scientists expose
| | ideas to risk of
| (Writing from Seattle!)