Quartz | Level 8

## Proc reg: Obs*R2

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

4 REPLIES 4
Meteorite | Level 14

## Re: Proc reg: Obs*R2

Hi @Golf

PROC REG assigns a name to each table it creates in the results.

You can retrieve them through the ODS OUTPUT:

-> 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"?

Quartz | Level 8

## Re: Proc reg: Obs*R2

Dear Ed,
Thanks for you response.
Obs*Rsquare is the number of observation multiply to R-square.
If I use "ods output fitstatistics = _fitstatistics", how can I know which symbols are used for the number of observation and the value of R-Square?
Best,
Diamond | Level 26

## Re: Proc reg: Obs*R2

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?

--
Paige Miller
Quartz | Level 8

## Re: Proc reg: Obs*R2

I need obs*R-square to test overidentification based on the method of Sargant test.
Thanks.
Discussion stats
• 4 replies
• 425 views
• 0 likes
• 3 in conversation