New Contributor
Posts: 3

# 'Regress r-square' in proc autoreg?

Hi,

Proc auto-reg outputs something called 'Regress R-Square' which the SAS documentation refers to as a 'measure of the fit of the structural part of the model after transforming for the autocorrelation'.

But having, in excel, performed the transformations and taken the r-square i don't get anything like this number. Does anyone know what this variable is? And how to calculated it from the transformed dependent and independent variables?

Super User
Posts: 11,343

## Re: 'Regress r-square' in proc autoreg?

Without seeing exactly what you did in Excel I would bet that you have an R-square from a linear regression, which does not take into account autocorrelation.

The SAS documentation for most of the modeling procedures as a details of computation section to look such up.

New Contributor
Posts: 3

## Re: 'Regress r-square' in proc autoreg?

Thanks for the reply - but that's a bet you would lose!

SAS produces two r-squares. I can recreate the final r-square that will include the autocorrelation, but it is the other r-square, called 'Regress R-Square' that I cannot recreate. The SAS documentation and elsewhere refer to this as the R-Square for the transformed problem and/or the R-Square for the structural part of the model - and it is this I cannot recreate.

Posts: 2,655

## Re: 'Regress r-square' in proc autoreg?

Well, it will depend on the method you are using to fit, as near as I can tell.  The YW, ULS and ML methods all have different ways of accommodating the autocorrelation.  As near as I can figure from the documentation, the TSSE comes from the solution to R.phi = -r and thus depends on all the lags and autocorrelations.  Since Excel isn't the greatest tool for matrix manipulations, is it possible that this is the source of your difference?

Steve Denham

New Contributor
Posts: 3

## Re: 'Regress r-square' in proc autoreg?

We're using YW and we have the initial and final betas matching exactly (so the matrix manipulation is working fine). We have the residuals (both from the transformed and untransformed problem) and these also match Excel.

From the transformed residuals TSSE should be straightforward to calculate (as it's just the sum of the squares) - so I don't think that will be were the problem is. TSST on the other hand seems oddly defined in the SAS documentation - "TSST is the total sum of squares of the transformed response variable corrected for the transformed intercept". - Do you know what is meant by correcting for the transformed intercept?

SAS can output the transformed response variable - and this matches - so it's just trying to get from these values to TSST!