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?
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.