next up previous


This LaTeX document is available as postscript or asAdobe PDF.

ANSC*6370 - QG and Animal Breeding
Fall 03 - Assignment 6 - Answers

Below is an example data set for a spline regression exercise. In a spline function, inclusion of one of the x-variables depends on the value of another variable. In this example x2 is included only if x1 is greater than 7, then x2 = x1 - 7, otherwise, x2=0. The number 7 is called a knot, a point in the curve where the shape changes direction. Below are the data and model equation:

\begin{displaymath}y_{i} = a \ + \ b_{1}x_{1} \ + \ b_{2}x_{1}^{2} \ + \
b_{3}x_{2}^{2} \ + \ e_{i}, \end{displaymath}

where

\begin{displaymath}{\bf y} = \left( \begin{array}{r} 147 \\ 88 \\ 202 \\ 135 \\ ...
...n{array}{r}
a \\ b_{1} \\ b_{2} \\ b_{3} \end{array} \right). \end{displaymath}

where \( V({\bf y}) = {\bf V} = {\bf I} \sigma^{2}_{e} \).

1.
Construct and solve the ordinary least squares equations.

\begin{displaymath}\left( \begin{array}{rrrr} 10 & 91 & 1017 & 203 \\
91 & 101...
...ay}{r} 1479 \\ 13784 \\ 150932 \\ 26890
\end{array} \right), \end{displaymath}


\begin{displaymath}\left( \begin{array}{r}
\hat{a} \\ \hat{b}_{1} \\ \hat{b}_{2...
...59.1891 \\ -27.0271 \\ 3.4550 \\ -5.7498
\end{array} \right). \end{displaymath}


2.
Give the basic AOV table, and R2 value.

Source df SS
Total 10 232597.0000
Mean 1 218744.1000
Model 4 229764.2700
Error 6 2832.7303

R2 = 0.7955.

3.
Test the following hypotheses using the general linear hypothesis method, and summarize the results in the AOV table.
(a)
a = 250.


s = (-90.81093)2/5.1598397 = 1598.2328.


F1,6 = 3.3852.


(b)
\( b_{1} = -5, \ \ b_{2} = 0. \mbox{ and } b_{2}-b_{3}=3. \)

\begin{eqnarray*}({\bf H}'_{o}\hat{\bf b} - {\bf c}_{o}) & = & \left( \begin{arr...
...ay} \right), \\
s & = & 154179.37, \\
F_{3,6} & = & 108.8557.
\end{eqnarray*}



4.
Repeat the analysis without x22 in the model. Compare the two models using $-2log(p({\bf y}\mid{\bf\theta}))$.

For model with 4 columns, $-2log(p({\bf y}\mid{\bf\theta}))= 65.57$, and for model with 3 columns, $-2log(p({\bf y}\mid{\bf\theta}))= 75.63,$therefore, model with 4 columns in ${\bf X}$ is better.


next up previous

This LaTeX document is available as postscript or asAdobe PDF.

Larry Schaeffer
2003-10-23