Hello,
Based on the result of the proc reg below.
proc reg data = example outest=parameters;
model y = A B C D E F;
run;
How can I use SAS to calculate Obs*Rsquare, instead of using calculator?
Thank you
Hi @Golf
PROC REG assigns a name to each table it creates in the results.
You can retrieve them through the ODS OUTPUT: https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_reg_details52.htm&docsetVersion=1...
-> To retrieve the value of the R square (i.e. the % of variability explained by the model), the table name is FITSTATISTICS. Here is the code to be submitted before the PROC REG:
ods output fitstatistics = _fitstatistics;
What do yo mean by "Obs*Rsquare"?
You probably need
ods output fitstatistics=fitstatistics nobs=nobs;
as the number of observations used in the regression is in the NOBS table.
how can I know which symbols are used for the number of observation and the value of R-Square?
You can know which variables contain the values you want by actually looking at these data sets that are created.
I'm skeptical that Obs*Rsquare has any particular meaning in a regression; why do you want this value?
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 save with the early bird rate—just $795!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.