4.7 - Try it!

Exercise 1: Design Matrix Section

Below is a design matrix for a data set of a recent study.

\[ \begin{pmatrix} 1 & 1 & 0 & 0\\ 1 & 1 & 0 & 0\\ 1 & 1 & 0 & 0\\ 1 & 0 & 1 & 0 \\1 & 0 & 1 & 0\\1 & 0 & 1 & 0\\1 & 0 & 0 & 1\\1 & 0 & 0 & 1\\1 & 0 & 0 & 1\\1 & -1 & -1 & -1\\1 & -1 & -1 & -1\\1 & -1 & -1 & -1\end{pmatrix} \]

  1. Identify the number of treatment levels and replicates.

    4 treatment levels and 3 replicates

     

  2.  Name the model and write its equation.

    This design matrix corresponds to the effects model and the model equation is \(Y_{ij}=\mu+\tau_i+\epsilon_{ij}\), where i = 1 to 4;  j = 1 to 3 and \(\sum_{i=1}^4 \tau_i = 0\).

     

  3. Write the equation and the design matrix that corresponds to the cell means model.

    The equation for the cell means model is: \(Y_{ij}=\mu_{i}+\epsilon_{ij}\) where i = 1 to 4 and j = 1 to 3. The design matrix corresponding to the cell means model is:

    \[ \begin{pmatrix} 1 & 0 & 0 & 0\\ 1 & 0 & 0 & 0\\ 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\0 & 1 & 0 & 0\\0 & 1 & 0 & 0\\0 & 0 & 1 & 0\\0 & 0 & 1 & 0\\0 & 0 & 1 & 0\\0 & 0 & 0 & 1\\0 & 0 & 0 & 1\\0 & 0 & 0 & 1\end{pmatrix} \]

     

  4. Write the equation and the design matrix that corresponds to the dummy variable regressions model.

    The equation for the 'dummy variable regression' model is: \(Y_{ij} = \mu + \mu_i+\epsilon_{ij}\) for i = 1 to 3 and j = 1 to 3. 

    \(Y_{4j}=\mu + \epsilon_{4j}\)

    The design matrix is given below. Note that the last 3 rows correspond to the 4th treatment level which is the reference category and its effect is estimated by the model intercept.

    \[ \begin{pmatrix} 1 & 1 & 0 & 0\\ 1 & 1 & 0 & 0\\ 1 & 1 & 0 & 0\\ 1 & 0 & 1 & 0 \\1 & 0 & 1 & 0\\1 & 0 & 1 & 0\\1 & 0 & 0 & 1\\1 & 0 & 0 & 1\\1 & 0 & 0 & 1\\1 & 0 & 0 & 0\\1 & 0 & 0 & 0\\1 & 0 & 0 & 0\end{pmatrix} \]