Presentation is loading. Please wait.

Presentation is loading. Please wait.

Inference About 2 or More Normal Populations, Part 1

Similar presentations


Presentation on theme: "Inference About 2 or More Normal Populations, Part 1"— Presentation transcript:

1 Inference About 2 or More Normal Populations, Part 1
BMTRY 726 6/12/2018

2 Paired Samples Common when we want to compare response to treatment before and after using the same subject. Helps control subject to subject variation. Univariate case:

3 Paired Samples Multivariate case: Notation

4 Paired Samples Multivariate case:
(2) Results 6.1: Assuming the differences D1, D2,…, Dn are a random sample from a Np(d,Sd), then This follows directly from the one sample Hotelling’s T2 test in chapter 5.

5 Paired Samples Thus it is easy to see that the 100(1-a)% confidence region for d is Similarly the 100(1-a)% simultaneous confidence intervals for the individuals di’s are And the Bonferroni 100(1-a)% CIs for the individuals di’s are

6 Example: Faculty Grading
Two Dental Medicine Faculty are interested in whether they are consistent in their grading of student crown preparations The each evaluate 5 different student preparations based on 2 measures Surface preparation for the crown How well the students bonded the crown

7 Example: Faculty Grading
What is the hypothesis?

8 Example Tooth ID Surface F1 Bonding F1 Surface F2 Bonding F2 1 80 90
70 85 2 65 75 3 4 95 5 60

9 Example Find T2

10 Example What are 95% simultaneous CIs for d1 and d2 (F2,3(a) = 9.55)?

11 2nd Example: Missing Incisor Repair
Recall our example of use of braces to fix the gap caused by a congenital missing incisor The initial question was whether or not use of braces made facial appearance closer to “normal” The same PI is also interested in whether or not use of braces significantly change a person’s facial features Recall there 3 measures: 2 hard tissue and 1 soft tissue The PI also has data on these measure pre and post-braces

12 2nd Example: Missing Incisor Repair
What is our hypothesis?

13 2nd Example: Missing Incisor Repair
> inc<-read.csv("H:\\public_html\\BMTRY726_Summer2018\\Data \\MissingIncisor.csv") > head(inc) ID pre_M1 pre_M2 pre_M3 post_M1 post_M2 post_M3

14 2nd Example: Missing Incisor Repair
> dinc<-cbind(c(inc[,2]-inc[,5]), c(inc[,3]-inc[,6]), c(inc[,4]-inc[,7])) > library(ICSNP) > T2b<-HotellingsT2(dinc, mu=c(0,0,0), test="f") > T2b Hotelling's one sample T2-test data: dinc T.2 = , df1 = 3, df2 = 30, p-value = 3.553e-15 alternative hypothesis: true location is not equal to c(0,0,0)

15 2nd Example: Missing Incisor Repair
### 95% Simultaneous CIs > mu<-colMeans(dinc); mu [1] > S<-var(dinc); p<-ncol(dinc); n<-nrow(dinc) > round(c(mu[1]-sqrt(p*(n-1)/(n-p)*qf(0.95, p, n-p))*sqrt(S[1,1]/n), mu[1]+sqrt(p*(n-1)/(n-p)*qf(0.95, p, n-p))*sqrt(S[1,1]/n)), 3) [1] > round(c(mu[2]-sqrt(p*(n-1)/(n-p)*qf(0.95, p, n-p))*sqrt(S[2,2]/n), mu[2]+sqrt(p*(n-1)/(n-p)*qf(0.95, p, n-p))*sqrt(S[2,2]/n)) , 3) [1] > round(c(mu[3]-sqrt(p*(n-1)/(n-p)*qf(0.95, p, n-p))*sqrt(S[3,3]/n), mu[3]+sqrt(p*(n-1)/(n-p)*qf(0.95, p, n-p))*sqrt(S[3,3]/n)) , 3) [1]

16 2nd Example: Missing Incisor Repair
### 95% Bonferroni CIs > c(mu[1]-qt(1-0.05/6, n-1)*sqrt(S[1,1]/n),mu[1]+qt(1-0.05/6, n-1)*sqrt(S[1,1]/n)) [1] > c(mu[2]-qt(1-0.05/6, n-1)*sqrt(S[2,2]/n), mu[2]+qt(1-0.05/6, n-1)*sqrt(S[2,2]/n)) [1] > c(mu[3]-qt(1-0.05/6, n-1)*sqrt(S[3,3]/n),mu[3]+qt(1-0.05/6, n-1)*sqrt(S[3,3]/n)) [1]

17 Repeated Measures Consider a design with 1 response variable but multiple treatments for the same subject For example… -Measure outcome at different time points -Measure response under different treatments -Measure response for different raters

18 Repeated Measures Cognitive performance in Parkinsons rats:
-Three treatments to improve cognitive performance -Each rat receives each treatment for 1 week -Measure average cognitive performance at the end of each week of treatment Identification of seizure center onset in patients with epilepsy -70 intercranial electrodes in different regions of the brain -Record electrode activity during 10 seizures -Measure average connectivity for all electrode pairs

19 Repeated Measures & Contrasts
Test the hypothesis Write the null hypothesis in matrix form

20 Repeated Measures & Contrasts
Transform the vector of observed values Then Y1, Y2, …, Yn is a random sample form a q -1 dimensional normal with mean Cm and So our Hotelling T2 test statistic is

21 Repeated Measures & Contrasts
Proof Solve for S_Y in terms of S_X in class

22 Repeated Measures & Contrasts
So consider data Test: Reject if: Note, for

23 Example Reaction times n = 20 people to visual stimuli driving in a simulator at 0, 30, and 60 minutes after consumption of 2 alcoholic beverages. Have the calculate T^2

24 Example The investigator in the study wants to examine if there is a difference in reaction times across the different times. What is the hypothesis? Have the calculate T^2

25 Example Are the mean reaction times the same for all 3 stimuli?
Have the calculate T^2

26 Example Are the mean reaction times the same for all 3 stimuli?
Have the calculate T^2

27 Example Are the mean reaction times the same for all 3 stimuli?
Have the calculate T^2

28 More about Contrasts Note the choice of C is not unique. Any matrix C that is of full (row) rank will do and defines the null hypothesis in the same way In the example we could write These C matrices will give the same T2 value

29 More about Contrasts Proof

30 -Four anesthetic treatments given to n = 19 dogs:
Example 6.2 in the book -Four anesthetic treatments given to n = 19 dogs: -T1 = High CO2, no Halothane -T2 = Low CO2, no Halothane -T3 = High CO2, with Halothane -T4 = Low CO2, with Halothane Milliseconds between heartbeats was measured for each treatment

31 We want to know if average time between heartbeats the same for the four treatments?
We could use something similar to our last example…

32 We could use C to for more focused comparisons…
What specific hypotheses might we be interested in? What about C?

33 If we use the C we just described what do we decide…

34 Repeated Measures: CIs
For Cm, the 100(1-a)% confidence region is: Similarly the 100(1-a)% simultaneous confidence intervals for single contrasts are And the Bonferroni 100(1-a)% CIs for the individuals contrasts are

35 We can construct 95% simultaneous confidence intervals for these 3 contrasts…
Halothane versus no Halothane High CO2 versus low CO2 Interaction between Halothane and CO2

36 However if a priori we decide we are only interested in these three effects, we can construct Bonferroni CIs Halothane versus no Halothane High CO2 versus low CO2 Interaction between Halothane and CO2

37 Conclusions Use of halothane produces longer times between heartbeats. This is consistent across CO2 levels since the interaction was not significant Lower levels of CO2 results in longer times between heartbeats whether or not halothane is used. -Note, we did not need T2 to come to this conclusion -The investigators in this study also did not randomized order in which the dogs received each treatment combination. Thus time or carry-over effects may be confounded with halothane or CO2 effects.

38 What About ANOVA? ANOVA table
Use of the F-test in this ANOVA is based on the assumptions (1) The 4 observations for each dog are independent (2) Observations taken in different dogs are independent (3) Homogeneous variance Source of Variation d.f. Sums of Squares Mean Square Halothane 1 208101 CO2 17129 Interaction 777 Error 72 405229 5628 Corrected Total 75

39 Repeated Measures Random Sample: Linear model:
random errors can have different variances and can also be correlated

40 Mixed Model Analysis What happens if we have the following data
We also assume {sj} are independent of {rij} Note: Observations taken on the same subject are correlated leading to… Fixed Trt Effect Random Sub Effect Random w/in Sub Effect

41 Mixed Model Analysis For the jth subject

42 Correlation between any 2 obs on the same unit
Then Where Correlation between any 2 obs on the same unit -Note: the T2 test doesn’t assume this special covariance structure

43 Mixed Model ANOVA Where Reject if Source of Variation d.f.
Sums of Squares Mean Square Treatment w/in subject p-1 Subjects n-1 Error (p-1)(n-1) Corrected Total np-1 Where Reject if

44 When the mixed model covariance structure is correct

45 When the mixed model F-test is applied when The type I error level often exceeds the specified a When is true Where the zj’s are the NID(0,1) random variables

46 Otherwise Where

47 Note that q will be close to when S has a large diversity in variance, or S has some unequal eigenvalues near zero, or both q = 1 if the mixed model assumptions are correct, or more generally when

48 Since S is unknown, a conservative approach is to make q as small as possible, i.e. close to Then Reject H0: m1 = m2 = … = mp if Alternative approach: -Estimate q from the data

49 Analysis of Repeated Measures Studies
Mixed model ANOVA: -Familiar random subjects model -Simple, well known -Assumes Equal variances and equal correlations -Good power -Other covariance structures are available in PROC MIXED

50 Analysis of Repeated Measures Studies
Conservative degrees of freedom: -Familiar random subjects mixed model -Arbitrary covariance structure -Conservative -Actual type I error has less than nominal a -Loss of power -Could estimate correction to degrees of freedom

51 Analysis of Repeated Measures Studies
Hotelling T2 (or MANOVA) -Arbitrary covariance structure -Exact type I error level -Less familiar -Power: -More power than conservative degree of freedom approach -Less power than random subjects mixed model


Download ppt "Inference About 2 or More Normal Populations, Part 1"

Similar presentations


Ads by Google