STAT 511 Final Exam Solutions Spring 1999 Note that there may be than one way to approach a problem. Sometimes several approaches are considered below, although students were expected to give only one answer. The solutions given below sometimes include comments or details that were not expected in answers provided by students. Not every possible solution is considered below. 1. a. (6 points) β0 is the upper bound or asymptote for the mean responsiveness as the dosage level becomes large. β1 is the dosage level required to achieve 50% of the upper bound to the mean responsiveness. It is a scaling parameter in this sense. b. (10 points) Standard errors are obtained from the large sample normal distribution for the least ∧ ∧ −1 squares estimator β , i.e., β ~ N β, σ 2 D T D , where D is an nxp matrix in which ( ∂E(Yi ) the i-th row is ∂β 0 ∂E(Yi ) ∂β1 ∂E(Yi ) . ∂β 2 ) The formulas for these derivatives can ∧ be found in the S-Plus code provided on page 2 of the exam. The covariance matrix for β is estimated as ∧ ∧ ∧ σ 2 D T D −1 ∧ ∧ ∧ , where D is D evaluated at β and σ 2 is the residual 2 mean square, i.e., ∧ ∧ ∧ 1 19 β0 2 σ = ∑ Yj - β 0 ∧ . 19 - 3 j=1 ∧ β2 1 + x j β 1 c. (4 points) Deviance is used as the label for various quantities in S-Plus. In this case, we are dealing with least squares estimation and the deviance is the sum of squared residuals: 1 2 ∧ 19 ∧ β0 deviance = ∑ Yj - β 0 ∧ . j=1 ∧ β 2 1 + x j β 1 d. (10 points) Find the dosage level, call it X0, at which the mean response is E(Y0) = 80. Using the least squares estimate of the model, the estimated dosage is ∧ Y0 X 0 = β 1 ∧ β 0 - Y0 ∧ ∧ 1 β2 1 Y0 = β 1 exp ∧ log ∧ = 5.986 . β 2 β 0 - Y0 ∧ Use the delta method to obtain a standard error based on the large sample normal ∧ approximation to the distribution of X 0 . Compute ∂X G = 0 ∂β 0 ∂X 0 ∂β1 ∂X 0 ∂β 2 -X 0 = β 2 (β 0 − Y0 ) Y0 -X 0 log 2 β 0 − Y0 β2 X0 β1 ∧ ∧ ∧ and let G denote G evaluated at β = β . Then, a standard error for X 0 is S∧ X0 = ∧ ∧∧ ∧ −1 ∧ σ G D D 2 T GT . Some students estimated the dosage at which E(Y0) = 80β 0 . Full credit was given for this solution, although the details are not shown here. 2 (e) (8 points) A lack-of-fit test can be performed in the following way. Note that two responses were obtained at six of the dosage levels. Let Yjk denote the k-th response obtained for the j-th dosage level. Here j = 1,2,....,13 and k = 1, n j with n1 = n 2 = n 3 = n10 = n11 = n12 = n13 = 1 and n 4 = n 5 = n 6 = n 7 = n 6 = n 7 = 2. Following the way Venables & Ripley use approximate F-tests in the least squares analysis of non-linear models, a lack-of-fit test is obtained by rejecting the proposed model model A: Yjk = β 0 - ( β0 1 + X j β1 ) β2 + ε jk in favor of the general alternative (that specifies a separate mean response for each dosage level) model B: Yjk = µ j + ε jk if F = (deviance model A - deviance model B ) / (16 − 6) > F(10,6), α . (deviance mod el B ) / (6) Note that the least squares estimates of the means under model B are simply the sample means at the individual dosage levels and 9 2 _ 2 deviance model B = ∑ ∑ Yjk - Y j• . j=4 k =1 Some students mentioned residual plots, but they would provide essentially the same information provided by the plot on page 3 of the exam. Other students proposed likelihood ratio tests, but there is no likelihood function because the distribution of the random errors was not specified. Furthermore, the Pearson chi-square test, that we used for binomial and Poisson counts, would not necessarily have an approximate chi-square distribution in this situation, regardless of the sample size. 2. (10 points) Almost everyone received full credit for this problem. The basic steps in computing a bootstrapped estimate of a standard error are: 1. Use simple random sampling with replacement to select a bootstrap sample of n=100 values from the original sample. 2. Compute the 20% trimmed mean for the bootstrap sample. 3. Repeated steps 1 and 2 a large number of times (B=200 should be sufficient, but the computations are quickly done so I would use B=5000) 4. Compute the standard deviation of the B values for the trimmed mean obtained from the bootstrap samples. 3 3. (a.) (6 points) For (Y1, X1) , (Y2 , X2 ) ,...., (Yn , X n ) , where Yj is a random response and X j is a vector of fixed explanatory variables, the basic features of a generalized linear model are: • • Y1 ,...., Yn are independent The distribution of Yj is a member of the exponential family of distributions • There is a smooth link function h( ) such that h(E( Yj |X j )) = X jT β . (b) (8 points) Use Yj to denote the number of male turtles that emerge from the n j = 20 eggs incubated at the j-th temperature. Assuming that Yj ~ Bin(n j , π j ) j=1,2,...,6 , and the observations are independent, the test statistic tests the null hypothesis H o : log(1 - log(1 - π j )) = β 0 + β1X j j = 1,2,...,6 against the alternative Ha : log(1 - log(1 - π j )) = α j , j = 1,2,...,6 The alternative places no restrictions on the probabilities other than 0 < π j < 1, for j=1,2,...,6. This is a lack-of-fit test. For large sample sizes, this test statistic approximately has a central chi-square distribution with (6-2) = 4 degrees of freedom when the null hypothesis is true. (c) (8 points) Like many situations you may encounter as a practicing statistician, the statement of the objectives in this question is somewhat vague. There are several approaches one could take. First you must decide how you will use the 120 eggs from the Illinois turtles. Most students avoided this issue, but those who addressed it decided to replicate the experiment that was performed on the New Mexico eggs. In that case, 20 of the Illinois eggs are incubated at each of the six temperatures used for the New Mexico eggs. We will assume that this experiment was done in remainder of this discussion. One approach was to compare male hatch rates for the New Mexico and Illinois eggs at the six temperatures without presupposing any particular relationship with temperature. Let YNM,j and YI,j denote the number of males that hatch from the n j = 20 New Mexico eggs and the n j = 20 Illinois eggs, respectively, incubated at the j-th temperature. Under the null hypothesis of no difference in locations, the mle for the probability that a male turtle hatches from an egg is p j = (YNM, j + YI, j ) / (2n j ) . Under the general 4 alternative, the mle’s for the probabilities of a male turtle emerging from an egg incubated at the j-th temperature are simply the observed proportions, p NM,j = (YNM, j / n j ) and p I,j = ( YI,j / n j ) , respectively. Then, a large sample chi-squared test can be obtained from the log of the ratio of the likelihoods (for independent binomial counts) multiplied by -2, i.e., 6 ( G 2 = 2 ∑ YNM, j log( p NM, j / p j ) + (n j - YNM,j )log((1 − p NM, j ) / (1 − p j )) j=1 6 ( + 2 ∑ YI,j log( p I, j / p j ) + (n j - YI, j )log((1 − p I, j ) / (1 − p j )) j=1 ) ) or the Pearson statistic X 2 (YNM,j - n jp j )2 = ∑ n jp j j=1 6 (n j - YNM, j - n j (1 - p j ))2 + ∑ n j (1 - p j ) j=1 6 (YI,j - n jp j )2 + ∑ n jp j j=1 6 (n j - YI,j - n j (1 - p j ))2 + ∑ n j (1 - p j ) j=1 6 Reject the null hypothesis if the test statistic is larger than the upper α percentile of a central chi-square distribution with 12-6=6 degrees of freedom. Another suggestion was to perform six separate chi-square tests, one at each temperature level, to test if the probabilities of a male are the same for New Mexico and Illinois eggs at each of the six temperatures used in this study. Either a deviance statistic (G 2 ) or a Pearson statistic could be used. Some students used a bootstrap procedure to do this. Some referred to the use of the conservative Bonferroni procedure to control the experimentwise Type I error level for the set of six tests. Most students took a more parametric approach. One idea was to fit the complimentary loglog model suggested in this problem to the data for the New Mexico eggs and independently fit the model to the data for the Illinois eggs, yielding two sets of parameter estimates. Use the test from part (b) to check if the complimentary log-log model is adequate for both populations of eggs. If the model is not rejected for either location, test the hypothesis that the two intercepts are equal and test the null hypothesis that the two slopes are equal. Some students indicated they would use a Bonferroni procedure to control the Type I error level. Some students proposed a bootstrap procedure for making confidence intervals for the difference in the two intercepts and the difference in the two slopes. 5 Another approach is to compare the fit of a nested set of models. (The methods we previously discussed are also included in this general strategy.) Here, the complimentary log-log model proposed in the question is fit to the combined data from the two experiments (call this model A). Then, the parameters in the complimentary log-log model are allowed to be different for the two locations (call this model B). Large sample chi-squared tests are provided by the deviance test 6 ( G 2 = 2 ∑ YNM, j log( p NM ( B), j / p A, j ) + (n j - YNM,j )log((1 − p NM( B), j ) / (1 − p A, j )) j=1 6 ( + 2 ∑ YI,j log( p I( B), j / p A, j ) + (n j - YI,j )log((1 − p I( B), j ) / (1 − p A, j )) j=1 ) ) or the Pearson statistic (n jp NM(B),j - n jp A, j )2 n j p A, j j=1 6 X2 = ∑ (n j (1 - p NM(B),j ) - n j (1 - p A, j ))2 n j (1 - p A, j ) j=1 6 + ∑ (n jp I(B),j - n jp A, j )2 n j p A, j j=1 6 + ∑ (n j (1 - p I(B), j ) - n j (1 - p A, j ))2 n j (1 - p A, j ) j=1 6 + ∑ Here, p NM( B), j and p I ( B), j denote the mle’s for the probability that a male emerges from an egg incubated at the j-th temperature, under model B, for eggs from the New Mexico and Illinois locations, respectively. Furthermore, p A, j denotes the mle for the probability that a male emerges form an egg incubated at the j-th temperatue under model A. When the null hypothesis is true (model A is correct) and the sample sizes are large enough, both of these test statistics have approximate central chi-square distributions with 4-2 = 2 degrees of freedom. Credit was given for any of these approaches as long as it was well described and implemented in a reasonable way. Other suggestions were made by students that are not reviewed here. Although this is not part of the solution, you should think about the potential advantages and disadvantages of the procedures outlined above. Would they necessarily yield the same inferences? When would one approach be preferred to another? 6 4. (a) (8 points) Here there are three rabbits (random effects) and two treatments (fixed effects). The proposed mode can be expressed as a mixed model: Y11 1 0 Y 0 1 12 Y21 1 0 µ1 = Y22 0 1 µ 2 Y31 1 0 Y32 0 1 where Var(u) = σ 2η I3× 3 1 1 0 + 0 0 0 and 0 0 η1 0 η 0 2 η 1 3 1 0 0 1 1 0 0 + ε11 ε 12 ε 21 = Xβ + Zu + ε ε 22 ε 31 ε 32 Var(ε ) = σ 2ε I 6 × 6 . (b) (8 points) Since X has full column rank, β is estimable and the unique blue for β is the _ ∧ − Y•1 1 generalized least squares estimator β GLS = X T Σ −1X X T Σ −1Y = _ Y •2 ( where ) Σ = σ 2η Z T Z + σ 2ε I 6 × 6 is a block diagonal matrix where each 2x2 block is σ 2ε + σ 2η σ2 η 2 2 σε + σ η σ 2η Given the distributions of the random effects listed in the statement of the problem, ∧ β GLS ~ N β, (XT Σ −1X) −1 . Note that the inverse of X T Σ −1X exists in this case and it is the unique generalized inverse. In fact, (X T −1 Σ X ) −1 2 2 1 σ ε + σ η = 3 σ2 η 7 2 2 σε + σ η σ 2η (I expected that the generalized least squares estimator would be given for the blue. Note that in this special case, the generalized least squares estimator is equivalent to the ordinary least squares estimator. You can easily show this. Hence, the ordinary least squares estimator is also an acceptable answer proving you correctly specify its covariance matrix.) (c) (8 points) An appropriate set of error contrasts would be M( I − PX )Y , where M is a kxn matrix with row rank equal to k=n-rank(X). In this case, k=6-2=4, and the elements of _ Y Y 11 _ •1 Y12 - Y _ •2 Y - Y • 1 (I − PX )Y = 21 _ Y22 - Y _ •2 Y31 - Y•1 _ Y - Y •2 32 satisfy two linear constraints. The basic idea of REML is to obtain an estimator of the variance components with less bias than the mle. In the simple examples we looked at in class, the mle produced estimators for variance components with negative bias because it divided a sum of squared deviations by the sample size n instead of the appropriate degrees of freedom. REML makes an adjustment for degrees of freedom by effectively reducing the number of observations from the original sample size n to n-rank(X), the number of error contrasts. (d.) (6 points) I anticipated (and awarded full credit) for a general statements about the generalized least squares estimator. In particular, that it may no longer be a linear estimator, or an unbiased estimator, or a best linear unbiased estimator. For large samples its distribution would be close to the normal distribution described in part (b). In this special case, however, _ Y •1 β GLS = X T Σ −1X X T Σ −1Y = X T X X T Y = _ Y •2 is not a function of the variance components and inserting REML estimates of variance components into Σ has no effect. Consequently, the generalized least squares estimator remains a best linear unbiased estimator with the exact finite sample normal distribution described in part (b). (I did not expect anyone to realize this during the exam.) ∧ ( ) ( −1 8 ) −1