Reputation: 57
I am testing the SAS REG procedure, in the Student version. I set up the table below:
data work.house;
input houseSize lotSize bedrooms granite bathroom sellingPrice;
cards;
3529 9191 6 0 0 205000
3247 10061 5 1 1 224900
4032 10150 5 0 1 197900
2397 14156 4 1 0 189900
2200 9600 4 0 1 195000
3536 19994 6 1 1 325000
2983 9365 5 0 1 230000
;
run;
And I performed the regression analysis with the various variables, as follows:
proc reg data=work.HOUSE;
model sellingPrice = houseSize lotSize bedrooms granite bathroom;
run;
SAS Student shows the results in a well organized and complete visual form, including many graphics.
However, I need to use the estimated parameters to forecast other inputs.
Is there any way to access these parameters?
Or is there a way to save the results (in particular the Parameter Estimates table) into a SAS dataset?
Upvotes: 0
Views: 1516
Reputation: 27508
Use the procedure option OUTEST=
to save the parameter estimates.
Use OUTPUT
statement to save the original data with predicted and residual values.
Example:
* output data sets highlighted with ^^^^;
proc reg noprint data=work.HOUSE outest=parameters;
* ^^^^^^^^^^ ;
model sellingPrice = houseSize lotSize bedrooms granite bathroom;
output out=predicted p=fitprice r=fitresidual;
* ^^^^^^^^^;
run;
quit;
Parameters
Predicted
Upvotes: 2