OLS versus MLE Example Here is the data

  • Slides: 3
Download presentation
OLS versus MLE Example Here is the data: Y X 0. 8 1 2

OLS versus MLE Example Here is the data: Y X 0. 8 1 2 3. 94 3 4. 6 4 5. 1 5 6 6. 9 7 8. 2 8 9. 3 9 10. 1 10

OLS versus MLE Example Here is the SAS code: OLS fitting using PROC GLM:

OLS versus MLE Example Here is the SAS code: OLS fitting using PROC GLM: proc glm data=data; model y = x; run; Call the procedure for data set “data” Regression model: y = b 0 + b 1 x MLE fitting using PROC GENMOD: proc genmod data=data; model y = x / dist=normal link=identity; run; Call the procedure for data set “data” Model: y = b 0 + b 1 x Assume normally distributed errors Use an identity link (the link function describes the relationship between y and the linear portion of the model)

OLS versus MLE Example Output from PROC GLM Source DF SS Model 1 81.

OLS versus MLE Example Output from PROC GLM Source DF SS Model 1 81. 2051 Error 8 1. 0533 Corrected Total 9 82. 2584 R-Square 0. 987195 Root MSE 0. 362857 Parameter Intercept X Estimate 0. 297333 0. 992121 Output from PROC GENMOD Mean Sq 81. 2051 0. 1316 SE 0. 2478 0. 0399 MLE s 2 = SS/n = 0. 10533 Ln(L) = -n/2*ln(2 pes 2) Criterion DF Deviance 8 Scaled Deviance 8 Log Likelihood Value/DF 1. 0533 0. 1317 10. 0000 1. 2500 -2. 9362 Parameter DF Estimate SE Intercept 1 0. 2973 0. 2217 X 1 0. 9921 0. 0357 Scale 1 0. 3245 0. 0726 Scale = f = (s 2)2 Note that SE estimates differ; MLE variance estimates are biased at low sample sizes = -5 ln(17. 07947*0. 10533) = -2. 9361 K = 3 (intercept, x, s) K = 3 (intercept, x, scale)