



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




(I).(Swiss Bank Notes). Here we have X a multivariate normal data matrix with parameters μ, D where D = diag(d) is a diagonal p × p matrix of variances, and C 0 a known correlation matrix. Let b be the
transformed parameter with bj = 1/
√ dj , 1 ≤ j ≤ p. Then the variance
matrix is Σ = D^1 /^2 C 0 D^1 /^2 , and
log L = C −
n 2
∑^ p
j=
log dj −
n 2
tr
( Σ−^1 (S + ( X¯ − μ)⊗^2 )
)
= C + n
∑^ p
j=
log bj −
n 2
∑^ p
j,k=
(C− 0 1 )jk bj bk(Sjk + ( X¯j − μj )( X¯k − μk))
For the information matrix calculation, note that
1 n
E(− ∇⊗ μ 2 log L) = Σ−^1 ,
n
E(−∇μ∇′ b log L) = 0
and
1 n
∂bj ∂bk
log L) =
b^2 j
δjk + E((C 0 − 1 )jk(S + ( X¯ − μ)⊗^2 )jk
so that the bb block is D + C 0 − 1 ∗ Σ where ∗ denotes componentwise multiplication.
Estimating the parameters from data involves maximizing the logLik : the estimator for μ is obviously μˆ = X¯, but the solution for D is not closed-form, satisfying (1/bj )pj=1 = (C 0 − 1 ∗ S)b.
Maximizing the logLik numerically on the Bank Notes data (first 100 observations, first 4 columns) yields for mean
Length Height/L Height/R Dist/Low 214.969 129.943 129.720 8.
and for diagonal variance parameters
exp(-2*minLLk$est) [1] 0.1476110 0.1247361 0.1185935 0.4070915 ### ML estimated diag(var(BankN[1:100,1:4])) Length Height/L Height/R Dist/Low 0.1502414 0.1325768 0.1262626 0.4132071 ### Sample var’s
obtained through the small R script reproduced below, which also shows that the theoretical formula for information works well.
BankN = read.table("bank2.dat")[1:100,1:4] names(BankN) = c("Length","Height/L","Height/R","Dist/Low") apply(BankN,2,mean) Length Height/L Height/R Dist/Low 214.969 129.943 129.720 8. C0 = matrix(c(1,.4,.4,.2,.4,1,.6,.2,.4,.6,1,.2, .2,.2,.2,1), ncol=4) M = solve(C0)var(BankN[1:100,1:4]) logLik = function(xv) { bv = exp(xv) -sum(xv) + 0.5c(bv %% M %% bv) } minLLk = nlm(logLik, rep(0,4)) $minimum [1] -1.
$estimate [1] 0.9565874 1.0407773 1.0660270 0.4493586 ### can see these
$gradient [1] 2.902123e-07 -5.124546e-07 -1.231004e-07 -5.906386e-
$code [1] 1 $iterations [1] 11
var(BankN[1:100,1:4]) Length Height/L Height/R Dist/Low Length 0.15024141 0.05801313 0.05729293 0. Height/L 0.05801313 0.13257677 0.08589899 0. Height/R 0.05729293 0.08589899 0.12626263 0. Dist/Low 0.05712626 0.05665152 0.05818182 0. Sighat = diag(exp(-minLLk$est)) %% C0 %% diag(exp(-minLLk$est))
#4.2.8. The steps given in the book’s statement of the problem lead to:
d = (SR′^ + da′) (RSR′^ + a⊗^2 )−^1 a
The additional reference in the Appendix amounts to the following: if W = RSR′, then (W + a⊗^2 )−^1 a = (1 + a′W −^1 a)−^1 W −^1 a. (We did calculations like that in class a couple of times, starting with W + a⊗^2 = W 1 /^2 (I + (W −^1 /^2 a)⊗^2 )W 1 /^2 and eigen-decomposing I + (W −^1 /^2 a⊗^2 ). The last steps are: d = (SR′^ + da′)(RSR′)−^1 a/(1 + a′W −^1 a)
so that (1 + a′W −^1 a)d = SR′W −^1 a + (a′W −^1 a)d
which immediately simplifies to: d = SR′W −^1 a.
#4.2.9. The issue here is to choose R, r so that the matrix R has full rank but the vector r is known. (It cannot involve x¯ 1 , x¯ 2! ) Essentially the only natural choice, after decomposing the mean-parameter μ into μ = (μ′ 10 ′)′, with μ 1 of dimension p − q, is to take r = (^0) q to be the q-dimensional vector of zeroes, with R = ( (^0) q×(p−q) Iq).
The numerical problem #5.3.2 gave the following answers:
(a), (b) Formula (5.3.6) gives 54.714, 13.998 respectively for T 2 (1, 34) and T 2 (1, 13) : reject strongly. (But R does not give Hotelling T 2 tables: to find percentage points, you would use the equivalence (3.5.3) with F distri- butions.) (c) (Box M-test, formula (5.3.26), 3df) 2.172, accept H 0. (d) Assuming equal variances, the 2-sample test equal to the second term of (5.3.24) times 47 is equal to the Hotelling 2-sample T statistic (3.6.4), since W is the within-groups sum of squares which is (35+14) times the pooled variance matrix in (c). The value is T 2 (2, 47) = 2. 1413 which corresponds to F 2 , 46 statistic (46/94)(2.1413) = 1.0479, so clearly accept equality. (The p-value is 0 .359.) The degrees of freedom for the within-groups sum of squares is 47 as given on p.139, 1/3 of the way down the page.
See next page for #5.3.6.
xbar = array(c(460.4,444.3,335.1,323.1), c(2,2), dimnames= list(c("Comm1","Comm2"), c("Femur","Humerus"))) Su = array(c(561.8,380.7,380.7,343.2),c(2,2)) (xbar[1,1]-xbar[2,1])/sqrt(Su[1,1](1/27+1/20)) [1] 2. 2(1-pt(2.3042,45)) ### 2-sided t_{45} p-val =. (xbar[1,2]-xbar[2,2])/sqrt(Su[2,2](1/27+1/20)) [1] 2. 2(1-pt(2.1956,45)) ### 2-sided t_{45} p-val =.
(2720/47)c((xbar[1,]-xbar[2,]) %*% solve(Su, xbar[1,]-xbar[2,])) [1] 5.46126 ### Hotelling T^2(2,45) statistic
(44/90)*5.46126 ### = 2.670, p-value =.
The book has a nice but not too specific little discussion of the way in which higher dimension affects the power of Hotelling 2-sample T 2 test. The issue has to do with the way in which separate uniariate t statistics are combined. Think of the case in which only one would be significant but you would not know which one. The ‘Bonferroni’ multiple comparisons method would simply multiply the separate p-values by 2 which would make neither one significant! The 2-sample T 2 is another way of combining: but unless the degree of significance increases with dimension, phenomena like those of this problem are possible.