Docsity

Homework 1 - Applied Longitudinal Data Analysis | ST 732, Assignments of Statistics

Toggle sidebar
bg1
ST 732, HOMEWORK 1, SPRING 2009
Due Thursday, January 22, 2009.
The first few exercises are meant to familiarize you with some matrix operations that are the basis for
the analyis used throughout the course. Future homeworks will not involve matrix algebra problems
like these except where relevant.
1. Suppose Aand Bare both 2 ×2 matrices with
A= 3−10
4 8 !,B= 5 9
−4 6 !.
(a) Verify that |A||B|=|AB|.
(b) Verify that |A|= 1/|A−1|.
(c) Verify that tr(AB) = tr(B A).
2. Let Y1and Y2be random variables with means µ1and µ2, variances σ2
1and σ2
2, and covariance
σ12, respectively. Let c1and c2be constants.
(a) Starting with the definition of variance in equation (3.2) of the notes and results
given in Chapter 3, show that
var(c1Y1+c2Y2) = c2
1σ2
1+c2
2σ2
2+ 2c1c2σ12.
(b) Let
Y= Y1
Y2!.
Write down the covariance matrix Σof Y.
(c) Let
c= c1
c2!.
Verify that var(c′Y) = c′Σc(bottom of p. 45 of the notes) by evaluating each side of this
equation and showing that they are equivalent.
The covariance matrix of a linear combination of elements of a random vector is of routine
interest in longitudinal analysis.
3. Let Y1and Y2be as in Problem 2. Let
C= c11 c12
c21 c22 !.
(a) Find CY and var(CY ) using results from Problem 1 and the definition of covariance.
(b) By doing the matrix multiplication CΣC′, show that var(CY ) = CΣC′as on p. 46 of
the notes, where Σis the matrix you found in Problem 1(b).
The covariance matrix of a general linear function of elements of a random vector is of routine
interest in longitudinal analysis.
1
pf3
pf4

Partial preview of the text

Download Homework 1 - Applied Longitudinal Data Analysis | ST 732 and more Assignments Statistics in PDF only on Docsity!

ST 732, HOMEWORK 1, SPRING 2009

Due Thursday, January 22, 2009.

The first few exercises are meant to familiarize you with some matrix operations that are the basis for the analyis used throughout the course. Future homeworks will not involve matrix algebra problems like these except where relevant.

  1. Suppose A and B are both 2 × 2 matrices with

A =

( 3 − 10 4 8

) , B =

( 5 9 − 4 6

) .

(a) Verify that |A||B| = |AB|. (b) Verify that |A| = 1/|A−^1 |. (c) Verify that tr(AB) = tr(BA).

  1. Let Y 1 and Y 2 be random variables with means μ 1 and μ 2 , variances σ^21 and σ 22 , and covariance σ 12 , respectively. Let c 1 and c 2 be constants. (a) Starting with the definition of variance in equation (3.2) of the notes and results given in Chapter 3, show that

var(c 1 Y 1 + c 2 Y 2 ) = c^21 σ^21 + c^22 σ^22 + 2c 1 c 2 σ 12.

(b) Let Y =

( Y 1 Y 2

) .

Write down the covariance matrix Σ of Y. (c) Let

c =

( c 1 c 2

) .

Verify that var(c′Y ) = c′Σc (bottom of p. 45 of the notes) by evaluating each side of this equation and showing that they are equivalent. The covariance matrix of a linear combination of elements of a random vector is of routine interest in longitudinal analysis.

  1. Let Y 1 and Y 2 be as in Problem 2. Let

C =

( c 11 c 12 c 21 c 22

) .

(a) Find CY and var(CY ) using results from Problem 1 and the definition of covariance. (b) By doing the matrix multiplication CΣC′, show that var(CY ) = CΣC′^ as on p. 46 of the notes, where Σ is the matrix you found in Problem 1(b). The covariance matrix of a general linear function of elements of a random vector is of routine interest in longitudinal analysis.

  1. (a) Suppose we have the following statistical model:

Yij = μ + bi + eij , where i = 1,... , m and j = 1,... , n, bi ∼ N (0, σ^2 b ), eij ∼ N (0, σ^2 e ), bi and eij are statistically independent for each i and j, and eij and eik are statistically independent for any two values j, k = 1,... , n. Find the variance of Yij and the covariance and correlation between any two values Yij and Yik, j 6 = k. (b) Let n = 3, and define

Y (^) i =

  

Yi 1 Yi 2 Yi 3

  .

Find the covariance matrix of Y (^) i, and express it in terms of a (3 × 3) identity matrix and the (3 × 3) matrix J whose elements are all equal to 1. (c) Show that the covariance matrix in (b) is of the form of one of the popular models in Section 4.4 of the notes by finding the associated correlation matrix and identifying to which popular model it corresponds. We will see that this covariance matrix plays a special role.

  1. Suppose that Y is a random vector with mean vector μ, where

Y =

    

Y 1

Y 2

Y 3

Y 4

Y 5

    

, μ =

    

μ 1 μ 2 μ 3 μ 4 μ 5

    

(a) Suppose that we are interested in the null hypothesis H 0 : μ 1 − μ 2 = 0, μ 1 − μ 3 = 0, μ 1 − μ 4 = 0, μ 1 − μ 5 = 0, which may be written alternatively as

H 0 :

  

μ 1 − μ 2 μ 1 − μ 3 μ 1 − μ 4 μ 1 − μ 5

   =^0 ,

where 0 is a (4 × 1) vector of zeros. Give an appropriate matrix L so that H 0 may be written in the form H 0 : Lμ = 0. (b) Now find an appropriate matrix L corresponding to the null hypothesis H 0 : μ 1 − μ 2 = 0, μ 2 − μ 3 = 0, μ 3 − μ 4 = 0, μ 4 − μ 5 = 0. Do the hypotheses in (a) and (b) address the same issue or different issues? Explain. (c) Find the matrix U such that you can express the hypothesis in (b) in the form H 0 : μ′U = 0 ′; note that now 0 ′^ is a (1 × 4) vector, so H 0 is being expressed as a row vector instead of a column vector. (d) Now suppose we are interested in the null hypothesis H 0 : μ 1 − (μ 2 + μ 3 + μ 4 + μ 5 )/4 = 0, μ 2 − (μ 3 + μ 4 + μ 5 )/3 = 0, μ 3 − (μ 4 + μ 5 )/2 = 0, μ 4 − μ 5 = 0. Re-express H 0 in the form H 0 : μ′U = 0 ′^ by finding the appropriate matrix U. We will see that this way of expressing hypotheses about the elements of a mean vector is standard for the ANOVA methods we will discuss and is used by SAS and other software for setting up hypotheses of interest.

class gender; model distance = gender age gender*age / solution; (f) From the output, identify and write down the estimates of the βs in model (2) and their estimated standard errors. Similarly, identify and write down the estimates of the αs in model (3) and their estimated standard errors. Verify that the correspondences between the βs and αs you found in (b) are satisfied by the estimated values. (g) Can you give a numerical estimate and standard error from either of these models of a quantity that addresses the question of whether the “rate of change” of distance over age is similar for boys and girls? If so, write down these values. If not, explain why not. In later chapters, we will consider regression models for longitudinal data and different ways to write them that are similar to those above. It will be interesting to compare the analyses above to the proper longitudinal analyses we will consider. You will want to refer back to this problem when we get to this part of the course.

  1. In the file insulin.dat on the class web page you will find longitudinal data from an ex- periment conducted by a diabetes researcher who was interested in comparing patterns of blood sugar reduction brought about by the use of several different insulin mixtures. The study involved m = 36 rabbits, where 12 rabbits were randomly assigned to each of 3 groups: group 1 rabbits received the “standard” insulin mixture, group 2 rabbits received a mixture containing 1% less protamine than the standard, and group 3 rabbits received a mixture con- taining 5% less protamine. Rabbits were injected with the assigned mixture at time 0, and blood sugar measurements were taken on each rabbit at the time of injection (time 0) and 0.5, 1.0, 1.5, 2.5, and 3.0 hours post-injection. Each data record in the file insulin.dat represents a single observation; the columns of the data set are (1) rabbit number, (2) hours (time), (3) response (blood sugar level), and (4) insulin group (1, 2, or 3). (a) Write a SAS program to obtain the following: (i) Read in the data in the form they appear in the data set and, if necessary, transform the data set into a form suitable for carrying out the analyses in (ii)–(v) below. (Hint: look at the program at the end of Ch. 4.) (ii) Find the means for each insulin group at each day and plot them for each group on the same graph (iii) Find the sample covariance and sample correlation matrix for each insulin group (iv) Obtain the centered and scaled versions of the responses at each month for each insulin group (you may wish to output them to a file if you are going to use R in (b) below). (v) Find the pooled sample covariance matrix and corresponding estimated correlation ma- trix under the assumption of a common covariance matrix (b) Use R, SAS proc insight or some other software to obtain a matrix of pairwise scatter- plots for each insulin group. (In R use the pairs function.) (c) Based on inspection of the results in (a) and (b), do you think the assumption of a common covariance matrix for each group is reasonable? Why or why not? Give details of your reasoning. (d) Based on inspection of the results in (a) and (b), what covariance model(s) do you think is(are) appropriate for these data? Give details of your reasoning.