5 Appendix
5.1 Calculate loglikelihood base on least square
In linear regression with fixed
The least square estimator and the normal maximum likelihood estimator of
thus we have
View(getAnywhere(lrtest.default)$objs[[1]])
, line 3View(getAnywhere(logLik.lm)$objs[[1]])
, line 22View(getAnywhere(lrtest.default)$objs[[1]])
, line 94, 102
5.2 Sum of squares decomposition for test
Assume we have
Reference: Multiple Linear Regression (MLR) Handouts by Yibi Huang