an introduction to generalized linear models - GDM@FUDAN ...
an introduction to generalized linear models - GDM@FUDAN ...
an introduction to generalized linear models - GDM@FUDAN ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
The least squares estimates are the solutions ofthe equations<br />
∂S1<br />
∂αj<br />
∂S1<br />
∂βj<br />
= −2<br />
= −2<br />
K�<br />
(yjk − αj − βjxjk) =0,<br />
k=1<br />
K�<br />
xjk(yjk − αj − βjxjk) =0. (2.10)<br />
k=1<br />
The equations <strong>to</strong> be solved in (2.8) <strong>an</strong>d (2.10) are the same <strong>an</strong>d so maximizing<br />
l1 is equivalent <strong>to</strong> minimizing S1. For the remainder ofthis example we will<br />
use the least squares approach.<br />
The estimating equations (2.10) c<strong>an</strong> be simplified <strong>to</strong><br />
K�<br />
K�<br />
yjk − Kαj − βj xjk = 0,<br />
k=1<br />
k=1<br />
K�<br />
K�<br />
xjkyjk − Kαj<br />
k=1<br />
K�<br />
xjk − βj x<br />
k=1<br />
k=1<br />
2 jk = 0<br />
for j = 1 or 2. These are called the normal equations. The solution is<br />
�<br />
K k<br />
bj = xjkyjk − ( � �<br />
k xjk)( k yjk)<br />
K �<br />
k x2 ,<br />
jk − (�k<br />
xjk)<br />
2<br />
aj = yj − bjxj,<br />
where aj is the estimate of αj <strong>an</strong>d bj is the estimate of βj, for j = 1 or 2. By<br />
considering the second derivatives of(2.9) it c<strong>an</strong> be verified that the solution<br />
ofequations (2.10) does correspond <strong>to</strong> the minimum ofS1. The numerical<br />
value for the minimum value for S1 for a particular data set c<strong>an</strong> be obtained<br />
by substituting the estimates for αj <strong>an</strong>d βj <strong>an</strong>d the data values for yjk <strong>an</strong>d<br />
xjk in<strong>to</strong> (2.9).<br />
To test H0 : β1 = β2 = β against the more general alternative hypothesis<br />
H1, the estimation procedure described above for model (2.7) is repeated<br />
but with the expression in (2.6) used for µjk. In this case there are three<br />
parameters, α1,α2 <strong>an</strong>d β, instead offour <strong>to</strong> be estimated. The least squares<br />
expression <strong>to</strong> be minimized is<br />
J� K�<br />
S0 = (yjk − αj − βxjk) 2 . (2.11)<br />
j=1 k=1<br />
From (2.11) the least squares estimates are given by the solution ofthe<br />
simult<strong>an</strong>eous equations<br />
K�<br />
∂S0<br />
= −2 (yjk − αj − βxjk) =0,<br />
∂αj<br />
∂S0<br />
∂β<br />
© 2002 by Chapm<strong>an</strong> & Hall/CRC<br />
= −2<br />
k=1<br />
J�<br />
j=1 k=1<br />
K�<br />
xjk(yjk − αj − βxjk) =0, (2.12)