Help using Base SAS procedures

Using output out

Reply
N/A
Posts: 0

Using output out

I'm trying to use residuals-squared as a dependent variable from a simple model (model y = x1 x2). I'm doing a Breusch-Pagan/Godfrey LM test and so I need to set up the model-- residuals-squared = x1 x2.

Can someone help me use residuals as a variable?
N/A
Posts: 0

Re: Using output out

You don't say what procedure you are using. The syntax is different for GLM versus REG. For GLM is would look something like the following:

Proc GLM;
model y = x1 x2;
output out=rdata r=resid_y;
run;

data step2;
set rdata;
sq_residual = resid_y * resid_y;
run;
Super Contributor
Super Contributor
Posts: 3,174

Re: Using output out

A curious question: did you try using the SAS support http://support.sas.com/ website and its SEARCH facility, or possibly using Google advanced search with the parameter "site:sas.com" to limit the search to SAS.COM??

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 2 replies
  • 106 views
  • 0 likes
  • 2 in conversation