I used proc spatialreg to analyze spatial econometrics model.
However, error messages kept showing up depending on model or data. "Opimization failed. Interpret the estimates with care" or
"Optimization cannot improve the function value". In addition, although the message 'Algorithm converged' comes out, standard error, t value, and p value don`t appear.
I specified quasi-Newton method and I specified maximum number of iterations as 1000.
When I use SAR model, this output comes out.
Model Fit Summary | |||||
Dependent Variable | t_crime | ||||
Number of Observations | 116 | ||||
Data Set | LKJ.D05_F | ||||
Spatial Weights | WORK.SWM | ||||
Model | SAR | ||||
Log Likelihood | -1058 | ||||
Maximum Absolute Gradient | 1.85E-06 | ||||
Number of Iterations | 167 | ||||
Optimization Method | Quasi-Newton | ||||
AIC | 2144 | ||||
SBC | 2182 | ||||
Algorithm converged. | |||||
Parameter Estimates | |||||
Parameter | DF | Estimate | Standard | t Value | Approx |
Error | Pr > |t| | ||||
Intercept | 1 | 8601.954 | 6.352752 | 1354.05 | <.0001 |
pop | 1 | 29.05341 | 2.875343 | 10.1 | <.0001 |
f_rate | 1 | 794.7308 | 387.8651 | 2.05 | 0.0405 |
ac | 1 | -634.92 | 147.059 | -4.32 | <.0001 |
ad | 1 | 380.3811 | 100.034 | 3.8 | 0.0001 |
old | 1 | -480.73 | 110.843 | -4.34 | <.0001 |
female | 1 | 179.7138 | 108.2588 | 1.66 | 0.0969 |
college | 1 | -164.403 | 58.18005 | -2.83 | 0.0047 |
mig | 1 | -127.122 | 44.54226 | -2.85 | 0.0043 |
house_1 | 1 | 167.0526 | 66.63577 | 2.51 | 0.0122 |
atax | 1 | 315.4854 | 81.58125 | 3.87 | 0.0001 |
train | 1 | 1368.529 | 841.2449 | 1.63 | 0.1038 |
_rho | 1 | 0.088868 | 0.124355 | 0.71 | 0.4748 |
_sigma2 | 0 | 4888967 | . | . | . |
However, when I use SAC model and other models, these output come out.
Model Fit Summary | |||||
Dependent Variable | t_crime | ||||
Number of Observations | 116 | ||||
Data Set | LKJ.D05_F | ||||
Spatial Weights | WORK.SWM | ||||
Model | SAC | ||||
Log Likelihood | -1474 | ||||
Maximum Absolute Gradient | 2824 | ||||
Number of Iterations | 363 | ||||
Optimization Method | Quasi-Newton | ||||
AIC | 2977 | ||||
SBC | 3018 | ||||
ERROR: Optimization failed. Interpret the estimates with care. | |||||
Parameter Estimates | |||||
Parameter | DF | Estimate | Standard | t Value | Approx |
Error | Pr > |t| | ||||
Intercept | 0 | 7284.729 | . | . | . |
pop | 1 | 27.55415 | 0.928053 | 29.69 | <.0001 |
f_rate | 1 | 315.0701 | 126.6845 | 2.49 | 0.0129 |
ac | 1 | -540.133 | 56.69547 | -9.53 | <.0001 |
ad | 1 | 259.395 | 39.98755 | 6.49 | <.0001 |
old | 1 | -450.053 | 36.2234 | -12.42 | <.0001 |
female | 1 | 48.66603 | 79.86923 | 0.61 | 0.5423 |
college | 1 | -161.944 | 19.16263 | -8.45 | <.0001 |
mig | 1 | -92.4311 | 14.38729 | -6.42 | <.0001 |
house_1 | 1 | 148.8553 | 22.76375 | 6.54 | <.0001 |
atax | 1 | 307.1371 | 26.51714 | 11.58 | <.0001 |
train | 1 | 1597.459 | 270.7654 | 5.9 | <.0001 |
_rho | 1 | -0.6494 | 0.117049 | -5.55 | <.0001 |
_lambda | 0 | 0.999642 | . | . | . |
_sigma2 | 1 | 499441 | 0.128961 | 3872796 | <.0001 |
or
Model Fit Summary | |||||
Dependent Variable | t_crime | ||||
Number of Observations | 116 | ||||
Data Set | LKJ.D05_F | ||||
Spatial Weights | WORK.SWM | ||||
Model | SMA | ||||
Log Likelihood | -1053 | ||||
Maximum Absolute Gradient | 1223 | ||||
Number of Iterations | 281 | ||||
Optimization Method | Quasi-Newton | ||||
AIC | 2133 | ||||
SBC | 2169 | ||||
WARNING: Optimization cannot improve the function value. | |||||
Parameter Estimates | |||||
Parameter | DF | Estimate | Standard | t Value | Approx |
Error | Pr > |t| | ||||
Intercept | 1 | -3562.56 | 43.40649 | -82.07 | <.0001 |
pop | 1 | 31.24189 | 0.270455 | 115.52 | <.0001 |
f_rate | 0 | 1113.872 | . | . | . |
ac | 0 | -631.177 | . | . | . |
ad | 0 | 459.1431 | . | . | . |
old | 0 | -435.751 | . | . | . |
female | 1 | 352.0277 | 0.973919 | 361.45 | <.0001 |
college | 0 | -153.23 | . | . | . |
mig | 0 | -106.113 | . | . | . |
house_1 | 1 | 193.9406 | 1.662491 | 116.66 | <.0001 |
atax | 1 | 339.6874 | 13.22217 | 25.69 | <.0001 |
train | 1 | 1067.575 | 87.99192 | 12.13 | <.0001 |
_lambda | 0 | 1 | . | . | . |
_sigma2 | 0 | 2669892 | . | . | . |
Restrict1 | -1 | 94906303 | . | . | . * |
I wonder how I could solve this optimization problem. Thank you.
Hard to say since you have not included your code or data, but the most common reason for non-convergence is that the model do not fit the data. Also common is trying to fit complex model with a small sample. I notice you only have 116 observations but your model contains 14-15 parameters.
I assume "get more data" would be hard, so try choosing a simpler model with fewer parameters.
Hard to say since you have not included your code or data, but the most common reason for non-convergence is that the model do not fit the data. Also common is trying to fit complex model with a small sample. I notice you only have 116 observations but your model contains 14-15 parameters.
I assume "get more data" would be hard, so try choosing a simpler model with fewer parameters.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.