The manual for -prais- says that the 'rhotype(nagar)' option computes rho by the formula (1) rho_nagar = (rho_dw*N^2 + k^2)/(N^2 - k^2). I cannot verify this. I run two Prais-Winsten regressions for the same model with the same data using rhotype(dw) and rhotype(nagar). Both are two-step estimators so rho is estimated one step using the same OLS residuals for both commands. Therefore, (1) should hold if the Manual is correct. We have
For this data set and model, we have N = 20 and k = 2. I have checked it (1) is satisfied. It isn't:
Instead, the equality holds if k is replaced with k+1 = 3
How can I make sense of the discrepancy between the Manual and the experiment results?
Code:
. webuse qsales, clear . prais csales isales, two rho(dw) . di e(rho) .63263622 . prais csales isales, two rho(nagar) . di e(rho) .6702161
Code:
. prais csales isales, two rho(dw) . scalar rho_dw = e(rho) . di (rho_dw*20^2 + 2^2)/(20^2 - 2^2) .64912749
Code:
. di (rho_dw*20^2 + 3^2)/(20^2 - 3^2) /* note 3^2 instead of 2^2 */ .67021608
Comment