We are trying to generate the residuals after running an oprobit regression. Our dataset consists of 202 towns and our dependent variable is the number of tire dealers, which can be 0,1,2,3,4 or 5.
The regression we are running is the following:
oprobit N_tire ln_Sm eld pinc lnhdd ffrac landv, robust
Where N_tire is the number of tire dealers. ln_Sm is the logarithm of the market size. eld is the fraction of old people in the population. pinc is the per capita income. lnhdd is the logarithm of heating degree days. ffrac is the fraction of land in farms and landv is the value per acre of land.
The output of the regression is:
Ordered probit regression
N_tire | Coef. | St.Err. | t-value | p-value | [95% Conf | Interval] | Sig | |||
ln_Sm | 1.271 | 0.122 | 10.44 | 0.000 | 1.033 | 1.510 | *** | |||
eld | -2.957 | 1.823 | -1.62 | 0.105 | -6.530 | 0.617 | ||||
pinc | 0.049 | 0.076 | 0.64 | 0.524 | -0.101 | 0.198 | ||||
lnhdd | 0.041 | 0.202 | 0.20 | 0.840 | -0.355 | 0.437 | ||||
ffrac | 0.089 | 0.261 | 0.34 | 0.733 | -0.422 | 0.600 | ||||
landv | -0.129 | 0.470 | -0.28 | 0.783 | -1.051 | 0.792 | ||||
cut1 | 0.259 | 1.854 | .b | .b | -3.374 | 3.893 | ||||
cut2 | 1.142 | 1.873 | .b | .b | -2.530 | 4.814 | ||||
cut3 | 1.957 | 1.880 | .b | .b | -1.728 | 5.641 | ||||
cut4 | 2.535 | 1.879 | .b | .b | -1.147 | 6.217 | ||||
cut5 | 2.938 | 1.875 | .b | .b | -0.737 | 6.613 | ||||
Mean dependent var | 2.233 | SD dependent var | 1.815 | |||||||
Pseudo r-squared | 0.255 | Number of obs | 202.000 | |||||||
Chi-square | 143.725 | Prob > chi2 | 0.000 | |||||||
Akaike crit. (AIC) | 541.263 | Bayesian crit. (BIC) | 577.654 | |||||||
*** p<0.01, ** p<0.05, * p<0.1 |
predict uhat, resid
However, if we do this, we get an error message saying option resid not allowed r(198);
We need to get the residuals of this regression in order to be able to get the standard deviation of the error term. We don't know how to fix this error. Please let us know if you know what we are doing wrong. Thank you very much.
0 Response to Predict residual error after oprobit regression
Post a Comment