Download presentation
Presentation is loading. Please wait.
1
OLS versus MLE Example YX 0.81 2.12 3.943 4.64 5.15 6.56 6.97 8.28 9.39 10.110 Here is the data:
2
OLS versus MLE Example Here is the SAS code: OLS fitting using PROC GLM: MLE fitting using PROC GENMOD: proc glm data=data; model y = x; run; proc genmod data=data; model y = x / dist=normal link=identity; run; Call the procedure for data set “data” Regression model: y = b 0 + b 1 x 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)
3
OLS versus MLE Example Source DF SS Mean Sq Model 1 81.2051 81.2051 Error 8 1.0533 0.1316 Corrected Total 9 82.2584 R-Square Root MSE 0.987195 0.362857 Parameter Estimate SE Intercept 0.297333 0.2478 X 0.992121 0.0399 MLE 2 = SS/n = 0.10533 = -5ln(17.07947*0.10533) = -2.9361 Ln(L) = -n/2*ln(2 e 2 ) Criterion DF Value Value/DF Deviance 8 1.0533 0.1317 Scaled Deviance 8 10.0000 1.2500 Log Likelihood -2.9362 Parameter DF Estimate SE Intercept 1 0.2973 0.2217 X 1 0.9921 0.0357 Scale 1 0.3245 0.0726 K = 3 (intercept, x, ) Scale = = ( 2 ) 2 K = 3 (intercept, x, scale) Output from PROC GLMOutput from PROC GENMOD Note that SE estimates differ; MLE variance estimates are biased at low sample sizes
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.