08-03-2015 12:30 PM
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?
Thanks for any help you can give!
08-03-2015 03:54 PM
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.
08-04-2015 05:36 AM
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.
08-05-2015 11:25 AM
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?
08-05-2015 11:44 AM
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!
08-05-2015 12:47 PM
Just guessing on this, but SST (not the transformed, but just ordinary sum of squares total) is the sum of squared deviations from the mean, so I believe that TSST would be the sum of squared deviations from the transformed mean. Since the intercept is defined by 0= a*Xbar + b, where Xbar is the mean, so would the transformed intercept be defined by 0 = a'X'bar +b' where I defined the primed values as the transformed values, especially the transformed mean. I would think given what you have that you could plug in the "transformed intercept" and the untransformed intercept, get the difference, add that to the untransformed mean, and then calculate TSST. AND I will wager a large sum of money that there is probably an easier way.