Hello,
I ran the following multiple linear regression:
proc reg data=regress1 outest=regress2;
model PERF = MKT SMB HML;
by id;
run;
and I would like to export the R² from all the regressions (for each ID) in an excel file.
However, even with 'outest', I only obtain RMSE and intercept for each ID.
Thanks a lot in advance for your help.
Max
ods output fitstatistics = fitstatistics;
proc reg ...
Will create a data set named fitstatistics which contains the R-squared values.
Alternatively, if you don't want to parse the ods file, just use the EDF option. e.g.:
proc reg data=class edf outest=regress3; model age = height weight; by sex; run;
Art, CEO, AnalystFinder.com
But then you have to parse the OUTEST file.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.