ODS OUTPUT goes immediately before the PROC statement, or inside the PROC, before RUN;
dear Mr. Paigemiller
as you have replied, i run the code in two different ways. Still i am not getting the required output
regression output is generated, but R-squared values are not produced separately.
i used the code as follows
ods output modelfit=modelfit;
proc reg data=stocks;
model Y1- Y5= X1 X2;
RUN;
QUIT;
OR
proc reg data=stocks;
model Y1- Y5= X1 X2;
ods output modelfit=modelfit;
RUN;
QUIT;
I am getting the following error in log
OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
73
74 proc reg data=stocks;
75 model Y1- Y5= X1 X2;
76 ods output modelfit=modelfit;
77 RUN;
78 QUIT;
WARNING: Output 'modelfit' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
NOTE: PROCEDURE REG used (Total process time):
real time 17.00 seconds
cpu time 3.96 seconds
kindly help me out
thanks in advance
This appears to be my mistake.
It should say
ods output FitStatistics=FitStatistics;
@srikanthyadav44 wrote:
dear all,
i have to run the regression where in the independent varaibles will be same, but dependent variables will change each time.
I have nearly 200 dependent variables.
i have to run the regression repeatedly for 200 times for each dependent variable.
Finally, I have to save the R-squared and adjusted R-squared value of each regression in a separate file along with the name of the dependent variable.
Since there are quite a few procedures in SAS that perform regression perhaps you can share the code you would run for one of the dependent variables.
Some procedures require slightly different methods of placing output into data sets, so your request for the r-squared may rely on the procedure. And possibly which r-squared for some sorts of regressions.
And what is to be done with the 200 output data sets?? You may want to rethink why you think you need so many data sets. This sounds like your next steps my involve lots of "loopy" code that may not be needed.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.