Statistics for exp. medical researchers Comparison of groups, T-tests and ANOVA

Size: px
Start display at page:

Download "Statistics for exp. medical researchers Comparison of groups, T-tests and ANOVA"

Transcription

1 Faculty of Health Sciences Outline Statistics for exp. medical researchers Comparison of groups, T-tests and ANOVA Lene Theil Skovgaard Sept. 14, 2015 Paired comparisons: tests and confidence intervals Two-sample T-tests Power and sample size One-way analysis of variance (ANOVA) as above, for related samples (two-way ANOVA) Hjemmesider: : indicates that this page may be skipped without serious consequences 1 / 96 2 / 96 Comparison of treatments/groups Example: Gene expression, 3 treatments vs. Control Important distinction: Treatments applied to distinct groups of units: Unpaired comparison, Two-sample T-test, One-way ANOVA Treatments applied to the same units: Paired comparison, Paired T-test, One-way matched samples ANOVA (=two-way ANOVA) Five identical cell lines are kept apart and stored for some weeks. They are divided into 4 parts, which are treated in 4 different ways, called 4 conditions: Control and treatments A, B and C. Gene expression is measured after 8 and 12 hours. Research question: Are the treatments any good? Which one is the best? Reference: Mattias Salling Dahllöf: Personal communication 3 / 96 4 / 96

2 Data at 12 hour measurement Traditional illustration Cell line Control A B C Average Median SD SEM Are these summary statistics informative? Somewhat - but we do not use the pairing The boxes show the average expressions for each condition The red bars show ± 1 Standard Error (for the mean) 5 / 96 6 / 96 Problems with this traditional illustration Alternative plots, I Get rid of the boxes, and show confidence limits instead: No indication of cell line (the pairing is not seen) Standard error reflects variation between cell lines (and n=5...) The boxes convey no information, only their height We get no impression of the distribution... But still: No indication of cell line (the pairing is not seen) We get no impression of the distribution... 7 / 96 Note that CI extends below 0 for Condition B and imagine what the reference regions would look like 8 / 96

3 Alternative plots, II Best choice: Spaghetti plots Box plots: Connect the cell lines: 9 / 96 Here we get an impression of the distribution but still no indication of cell line (the pairing is not seen) Note: The pairing can be seen We may judge the distribution...? But we have only 5 observations for each treatment / 96 Start simple: two conditions: A vs. ctrl Informative plot: Treatment A appears to be effectful, since all the lines have negative slope (lowest values for Ctrl, highest for A) 11 / 96 Paired comparisons Some cell lines (no. 5) show larger values than others: Are they analysed on the same day? By the same researcher? These differences are seen for both the A treatment and the control treatment We have paired observations Other examples of paired measurements: Two measurement techniques applied to the same individual/animal/blood sample Measurements on the same individual before and after treatment Case-control studies / matched pairs 12 / 96

4 Analysis of paired data Choice of scale Purpose: Investigate whether there is an actual difference between A- and Control treatment and quantify this difference. The cell line is its own control (matched samples) This gives larger power to detect possible differences. Look at individual differences but on which scale? (to be discussed...) Investigate whether the differences have mean zero Paired T-test Quantify the difference with a confidence interval and possibly also reference regions. Are the size of the differences independent of level of the measurements? In this case, the difference between treatments can be evaluated and quantified in the units of measurements Or do we see relative (percentage) differences: In this case differences should evaluated and quantified on a logarithmic scale (and transformed back) because ( ) A log = log(a) log(ctrl) Ctrl Look at Bland-Altman plot 13 / / 96 Bland-Altman plot Traditional model for paired data Scatter plot, showing for each cell line Y: Differences (treatment A minus Control) X: Averages of treatment A and Control X i : measurement for Control treatment of the i th cell line Y i : measurement for treatment A of the i th cell line The differences D i = X i Y i (i = 1,, n = 5) are assumed to be independent: the 5 cell lines do not share any properties (except from consisting of identical cells) Not a lot of information from 5 measurements... but still a tendency for larger differences when larger values! 15 / / 96 Violation of this assumption might be that e.g. 2 cell lines were analyzed on one day (by one researcher), and the remaining 3 on another day (another researcher)

5 Traditional model for paired data, II The Normal distribution The differences D i = X i Y i (i = 1,, n = 5) are furthermore assumed to have the same mean value δ and the same standard deviation (variance): evaluated by the aforementioned Bland-Altman plot of differences vs averages and to follow a Normal distribution: evaluated graphically by histograms or quantile plots (testing is not generally recommended, see p. 46) Imagine lots of observations, so that a histogram looks almost smooth, this is a density: Mean, often denoted µ or α Standard deviation, often denoted σ N(µ,σ 2 ) is theoretically justified by the Central Limit Theorem 17 / / 96 The Normality assumption Histogram of 5 differences Note: No assumption regarding the distribution of the actual measurements! Only assumptions regarding their differences because we are dealing with a paired design but we only have 5 differences: D 1 = 2.7, D 2 = 9.3, D 3 = 16.9, D 4 = 9.4, D 5 = 21.2 which is nowhere near enough to evaluate the appropriateness of a Normality assumption. We have to either trust the assumption (based on previous experience) do something else (nonparametric tests...?) 19 / 96 Do we see a Normal distribution? We cannot answer that because of the small sample size (n=5) 20 / 96

6 Quantile plot for 5 differences Inference = Statistical Analysis Do we see a straight line? We cannot really answer that because of the small sample size (n=5) 21 / 96 Based on the collected data we need to say something about the total population (in this case this particular type of cell, and its reaction to treatment): Estimation: When we see these 5 differences, what can we say about the two unknown parameters, δ and σ (mean and SD)? Test: Can we detect a systematic difference between treatment A and Control? Prediction: How large can we expect the differences between treatment A and Control to get when measuring on other cell lines of the same kind? 22 / 96 Estimation of mean difference Estimate for δ i.e the mean δ of the differences D i We denote this a one-sample problem : 5 independent observations of the same (normally distributed) variable, D: D i N (δ, σ 2 ) The Maximum likelihood principle tells us that the parameters δ and σ are estimated by the average D, respectively the empirical standard deviation s, or variance: s 2 = 1 n 1 Σ(D i D) 2 Maximum likelihood estimates are denoted by a hat, e.g. ˆδ. 23 / 96 ˆδ = D, the average difference proc means data=cells; var a_minus_control; Analysis Variable : a_minus_control N Mean Std Dev Minimum Maximum So we get: ˆδ = 11.9 (and s=sd=7.23) Estimates must be stated with uncertainty estimates! e.g. by quoting a confidence interval 24 / 96

7 Uncertainty of an estimate What does this mean? Here we are looking for the uncertainty of an average, as an estimate of the unknown true mean difference between treatment A and Control (or the difference between the two unknown means). We may imagine repetitions of the investigation: Each experiment yields a new estimate We may study the distribution of these estimates The standard deviation in this distribution quantifies the uncertainty in the estimate It is called the standard error (SE) of the estimate If we (as here) are concerned with a mean, it is called 25 / 96 standard error of the mean (SEM) To sum up The uncertainty of an average is called Standard error (of the mean), SE(M) and we have the relation SEM = SD n SEM gets smaller when the sample size n gets larger It is used for the construction of confidence intervals, that we will discuss now... It cannot be used for description of the variation of the measurements 26 / 96 Confidence interval Technical note, I Interval that cathes the unknown parameter (here the mean value δ) with a high (typically 95%) probability (95% coverage). What do we trust the unknown value of δ to be? 95% confidence interval for the mean δ: ˆδ ± t-quantile SEM Here, the t-quantile refers to the 97.5% quantile in the T-distribution with n 1 (here 4) degrees of freedom (typically abbreviated DF in output). The t-distribution (Student distribution) has a parameter, called df, the degrees of freedom (here: 2, 10, 100). Many degrees of freedom: The distribution looks like a Normal distribution Few degrees of freedom: Heavier tails. 27 / / 96

8 Technical note, II The 97.5% quantile in a T-distribution (the near-to-2 value) is highly dependent on the number of observations - when this is small: Here shown for degrees of freedom ranging from 2 to 30: 29 / 96 degrees.of.freedom quantile Confidence interval for δ Here we have SEM = = 3.23 and therefore a 95% confidence interval: 11.9 ± = (2.93, 20.88) This confidence interval may be obtained directly (and more precisely) from SAS: proc means N mean stderr clm data=cells; var a_minus_control; Analysis Variable : a_minus_control Lower 95% Upper 95% N Mean Std Error CL for Mean CL for Mean / 96 Interpretation of confidence interval Hypothesis testing (model reduction) The confidence interval for δ, the difference in means between treatment A and Control, was found to be This means: (2.92, 20.88) We have detected a systematic difference between the treatment A and Control (since the confidence interval contains only positive values, and not zero). The effect of treatment A (compared to Control) is (with 95% confidence) larger than 2.92 but smaller than Is this sufficient to be of interest? This is not a statistical question / 96 Can we simplify the model? Could some of the parameters be equal? (the mean value for treatment A and the mean value for the Control treatment) Could a parameter be equal to zero (the difference in the two means mentioned above). The null hypothesis: H 0 : δ = 0 We want to investigate whether H 0 is true or false. If H 0 is true, we know that the ratio T = ˆδ 0 SEM will have a t-distribution with 4 degrees of freedom (technical result). 32 / 96

9 Test statistic Test of no difference for our paired data A quantity that measures the discrepancy between observations and hypothesis General principle: The decrease in likelihood, from model to hypothesis Large discrepancy: Reject the hypothesis, because it does not fit to the data. But what does large mean here? Larger (more extreme) than expected by chance if the hypothesis is actually true, i.e. more extreme than usually seen in a t-distribution with 4 degrees of freedom. H 0 : δ = 0, Test statistic t = ˆδ 0 SEM = = 3.68 t(4) Does the value 3.68 fit well to a t-distribution with 4 degrees of freedom? No, this value lies far out in the tail of the distribution, and we will therefore reject the hypothesis. The P-value is 0.02, to be discussed in a moment. Small (numeric) t: Good fit, accept hypothesis (P > 0.05) Large (numeric) t: Bad fit, reject hypothesis (P < 0.05) 33 / / 96 Technical note on the T test statistic The P-value Where did the T-distribution come from? The average (ˆδ) is Normally distributed (based on our assumptions) but we divide with an estimated standard deviation Had the standard deviation been known, the test statistic would also have been Normally distributed Instead we estimate the standard deviation, and the penalty for the uncertainty in this estimation is the (somewhat heavier tailed) t-distribution (see p. 28) Reminder: The P-value is a measure of the agreement between the value of the test statistic and the theoretical distribution under H 0. More precisely, it is the tail probability, i.e. the probability of observing this or worse, provided that the hypothesis is true, worse meaning something speaking more against the hypothesis than what we actually observed 35 / / 96

10 The P-value, II Philosophy of P-value If the probability of observing something worse is very small, it must be pretty bad, what we did observe. But what is very small? If P is below the significance value, the test is significant, and the hypothesis is rejected The significance value α is usually chosen to be 5% (or 0.05), but this is arbitrary (more on this later on...) Here, we have t = 3.68 t(4), and P = 0.02, indicating mild discrepancy between data and hypothesis 37 / / 96 Tests vs. confidence intervals Paired T-test in SAS: A significant test statistic : Confidence interval not including 0 A non-significant test statistic : Confidence interval including 0 Tests and confidence intervals are equivalent Here, it is exact, sometimes it is only approximate 39 / 96 Three different ways to do it: 1. Using the simple procedure proc means: proc means N mean stddev stderr t probt data=differences; var A_minus_control; 2. Using the paired statement in proc ttest: proc ttest plots=all data=cells; paired control*treata; 3. Using a T-test on the precalculated differences, again with proc ttest: proc ttest data=cells; var A_minus_control; 40 / 96

11 Output from method 1 Output from method 2 and 3 The TTEST Procedure Analysis Variable : A_minus_control Difference: control - treata N Mean Std Dev Std Error t Value Pr > t N Mean Std Dev Std Err Minimum Maximum Mean 95% CL Mean Std Dev 95% CL Std Dev DF t Value Pr > t / / 96 Reference region: Limits-of-agreement When normality cannot be assumed How large are the typical differences between the two conditions for a single cell line Limits of agreement is a special notion for the reference region (interval) for differences, i.e. D ± approx. 2 SD = 11.9 ± = ( 8.17, 31.97) Based on this, we would say, that it may well happen that the difference is negative, so that the Control value is bigger than the value for the A condition. P-values may be too small or too big Confidence limits may be too narrow or too wide Then what? Non-parametric procedure: Wilcoxon signed-rank test No assumption of Normality Still assumption of independence and a symmetric distribution of the differences The Normality assumption is important here! even if you have a lot of observations. 43 / / 96

12 Wilcoxon signed rank test in SAS can only be performed on the calculated differences: proc univariate ciquantdf normal data=differences; var A_minus_control; with output Tests for Location: Mu0=0 Test -Statistic p Value Student s t t Pr > t Sign M 2.5 Pr >= M Signed Rank S 7.5 Pr >= S Note that the significance has disappeared It allways does, when the sample size is below 6! Confidence limits for median can be calculated (option ciquantdf) 45 / 96 Output, cont d Tests of normality (option normal on p. 45): Tests for Normality Test --Statistic p Value Shapiro-Wilk W Pr < W Kolmogorov-Smirnov D Pr > D > Cramer-von Mises W-Sq Pr > W-Sq > Anderson-Darling A-Sq Pr > A-Sq > Important note Tests for normality are very weak for n = 5. In general, they do not convey much information and are considered useless (more on p. 78) 46 / 96 New example: Selenium in cabbage Cabbage data Book p. 39: Compare two methods for determining the concentration of selenium in vegetables: Concentration is measured in 16 portions of a head of cabbage (units are mg per 100g): 8 portions with Method 1 8 portions with Method 2 Each portion can be only used once: There is no pairing Obs method selenium / / 96

13 What do we want to do? Model for unpaired comparison 1. State a reasonable model for the data 2. Estimate difference in mean values, with confidence interval 3. Test equality of means 4. Anything else? What is the purpose of the study? 49 / 96 Two groups, each assumed to have normally distributed observations: Method 1: Y 1i, i = 1,..., 8 N (µ 1, σ 2 ) Method 2: Y 2i, i = 1,..., 8 N (µ 2, σ 2 ) They need not be of identical size! Assumptions: All observations are independent The standard deviations are equal in the two groups should be checked, if possible Observations are Normally distributed in each group, with possibly different mean values 50 / 96 Summary statistics Normality assumption Hypothetical situation with two groups (dashed curves) Variable: selenium method N Mean Std Dev Std Err Minimum Maximum Do the means appear to be equal? No, based on the averages above, and the figure on p. 48 Do the standard deviations appear to be equal? Yes, based on the estimates above, and the figure on p. 48 What about normality? 51 / 96 Note: Totally (solid curve) we do not have a Normal distribution!! 52 / 96

14 Estimated difference of means Confidence interval for difference in means Estimate ˆµ 1 ˆµ 2 = Ȳ 1 Ȳ2 = = mg/(100 g) What is the uncertainty in this estimate? 1 SE(Ȳ1 Ȳ2) = s + 1 = n 1 n 2 where s=sd is a pooled estimate of the two standard deviations (here just an average because the groups are of equal size). Based on the estimated SE(Ȳ1 Ȳ2) and the degrees of freedom df=(n 1-1)+(n 2-1)=(8-1)+(8-1)=14, the 95% confidence interval becomes: ± = (0.0213, ) The number in the above formula is the 97.5% quantile in a T-distribution with 14 degrees of freedom (see p. 29). 53 / / 96 Unpaired T-test for equality of means Unpaired T-test in SAS Hypothesis: T = H 0 : µ 1 = µ 2 Ȳ1 Ȳ2 SE(Ȳ1 Ȳ2) = Ȳ1 Ȳ2 SD n1 n2 proc ttest data=book_p39; class method; var selenium; = = 3.89 which in a T distribution with 14 degrees of freedom gives a P-value P = , as seen in the output below The TTEST Procedure Variable: selenium method N Mean Std Dev Std Err Minimum Maximum Diff (1-2) method Method Mean 95% CL Mean Std Dev Diff (1-2) Pooled Diff (1-2) Satterthwaite / / 96

15 Output, continued Reminder Method Variances DF t Value Pr > t Pooled Equal Satterthwaite Unequal Equality of Variances Method Num DF Den DF F Value Pr > F Folded F Note the 2 different versions of the T test, depending upon whether the standard deviations (variances) are equal in the two groups. Here, we find a significant difference no matter what, i.e. we can reject the hypothesis of equal means. 57 / 96 The distribution of a test statistic Imagine many identical investigations, each with 16 observations made by a single method, and put: 1. 8 randomly chosen in one group, the rest in the other = t randomly chosen in one group, the rest in the other = t 2 etc. etc. Distribution of the t s (assuming H 0 to be true) A t-distribution (Student distribution) with 14 degrees of freedom. Our observed T should be compared to this distribution, Does it fit in nicely? No, it is too big and therefore, we can conclude the two methods to differ. 58 / 96 Technicalities, I Technicalities, II The assumption of equal variances can be checked by looking at their ratio: F = s2 2 s 2 1 See output on p. 57 = = 1.71 F(7, 7) P = There is no indication of violation of the assumption of equal variances. But the test is week due to the small sample size, since any variance ratio below 5 will be insignificant / 96 If variances differ or if we do not want to make the equality assumption, we may instead calculate t = Ȳ1 Ȳ2 se(ȳ1 Ȳ2) = See output on p. 57 Ȳ1 Ȳ2 s 2 1 n 1 + s2 2 n 2 = 3.88 t(13.096) Here, we get the identical T-value (due to the fact that sample sizes are equal) but a fractional degrees of freedom (due to approximations). Note also, that the confidence interval will become somewhat wider: (0.0211, ) in contrast to (0.0213, ). 60 / 96

16 Sample size considerations, I Sample size considerations, II Truth vs. Action: accept reject H 0 true 1-α α error of type I H 0 false β 1-β error of type II The significance level α (usually 0.05) denotes the risk, that we are willing to take of rejecting a true hypothesis, also denoted as an error of type I. accept reject H 0 true 1-α α error of type I H 0 false β 1-β error of type II β denotes the probability of accepting a false hypothesis, i.e. overlooking an effect, an error of type II. 1-β is denoted the power. This describes the probability of rejecting a false hypothesis. But what does H 0 false mean? How false is H 0? 61 / / 96 The power is a function of the true difference If the difference is xx, what is our probability of detecting it on a 5% level? Power: is calculated in order to determine the size of an investigation when the observations have been gathered, we present instead confidence intervals Paired or unpaired can make a huge difference If we had treated the comparison of treatment A and Control (see p ) as an unpaired comparison, we would have had The TTEST Procedure Variable: Expression Condition N Mean Std Dev Std Err Minimum Maximum A Ctrl Diff (1-2) Condition Method Mean 95% CL Mean Std Dev A Ctrl Diff (1-2) Pooled Diff (1-2) Satterthwaite Method Variances DF t Value Pr > t Pooled Equal Satterthwaite Unequal Equality of Variances Method Num DF Den DF F Value Pr > F Folded F / / 96

17 Paired or unpaired, II Example: Study of dissolution testing Comparison of results for Gene Expression example Question 10 in the book (p. 224): The mass of an active ingredient is measured in 24 identical tablets, 6 on each of 4 laboratories: Method for T value degrees of freedom P-value Conf. Int. comparison Paired (2.92, 20.88) Unpaired (1.88, 21.92) Here, the difference is not very big... because the correlation within cell line is not that big The design is unpaired 65 / / 96 Comparison of more than two groups Purpose of study Extension of the unpaired T-test, is called one-way ANOVA (Analysis Of Variance) Model: Laboratory 1: Y 1i, i = 1,..., n 1 N (µ 1, σ 2 ) Laboratory 2: Y 2i, i = 1,..., n 2 N (µ 2, σ 2 ) Laboratory 3: Y 3i, i = 1,..., n 3 N (µ 3, σ 2 ) Laboratory 4: Y 4i, i = 1,..., n 4 N (µ 4, σ 2 ) Y gi = µ g + ε gi, ε gi N (0, σ 2 ) Assumptions: just the same as for a two-group comparison (p. 50) Research questions: Quantify and test difference between laboratories Omnibus test of equality of means, H 0 : µ 1 = µ 2 = µ 3 = µ 4 gives rise to an F-test (see output on p. 70) Find estimates of reproducibility and repeatability (see pages 90-94) Estimate the uncertainty in everyday-measurements (see p. 94) 67 / / 96

18 One-way ANOVA in SAS Data has to be organized in 2 columns, one with the observations of outcome (mass) and the other with the classification variable (laboratory). Output from 1-way ANOVA The GLM Procedure Dependent Variable: mass laboratory mass A 6.77 A 6.79 A D 6.66 D 5.79 proc glm data=q10; class laboratory; model mass=laboratory / solution clparm; 69 / 96 Sum of Source DF Squares Mean Square F Value Pr > F Model Error Corrected Total R-Square Coeff Var Root MSE mass Mean Source DF Type III SS Mean Square F Value Pr > F laboratory We see a significant difference between the 4 laboratories (P= for test of identical mean values). Is this interesting? 70 / 96 Output, cont d Model checks (see p. 50) Standard Parameter Estimate Error t Value Pr > t Intercept B <.0001 laboratory A B laboratory B B laboratory C B laboratory D B... Parameter 95% Confidence Limits Intercept laboratory A laboratory B laboratory C laboratory D.. The above comparisons are made to the reference laboratory, which is D (the last in alphabetic order) Is this interesting? are performed by looking at Residuals: r gi = Y gi ˆµ g = Y gi Ȳg Graphics: Variance homogeneity Residuals vs. dairy product Residuals vs. predicted Normality Quantile plot of residuals Histogram of residuals may sometimes be supplemented by tests / / 96

19 Model assumption 1: Independence This is something you should know from the design of the study no twins, siblings etc. no duplicates, triplicates etc. only a single observation for each unit no unrecognized explanatory variable researcher to perform the measurement temperature in lab the specific day Model assumption 2: Identical standard deviations most often called variance homogeneity, and checked from Box plots or Scatter plots, see p. 66 Test of the hypothesis of equal variances (most often Levenes test, see next page) Residuals plotted against predicted values (ȳ g. ): 73 / 96 This should show no structure 74 / 96 Levenes test for identical variances Model assumption 3: Normality Additional means-statement, with option hovtest: proc glm data=q10; class laboratory; model mass=laboratory / solution clparm; means laboratory / hovtest; Levene s Test for Homogeneity of mass Variance ANOVA of Squared Deviations from Group Means Sum of Mean Source DF Squares Square F Value Pr > F laboratory Error The observations are assumed to be Normally distributed, with different means, according to group. Check this by drawing histograms or quantile plots for each group separately (in case you have a lot of observations). Otherwise by drawing histograms or quantile plots for the residuals r gi = Y gi ˆµ g = Y gi Ȳg When comparing the k = 4 variance estimates, we get a test statistic F=1.42, which has an F(3,20)-distribution, corresponding to P=0.27, and therefore no significance. Limited value for small samples, see p / / 96

20 Tests for Normality Tests for model assumptions proc glm data=q10; class laboratory; model mass=laboratory / solution clparm; output out=ny P=yhat R=residual; proc univariate normal data=ny; var residual; with output The UNIVARIATE Procedure Variable: residual Tests for Normality Test --Statistic p Value Shapiro-Wilk W Pr < W Kolmogorov-Smirnov D Pr > D > Cramer-von Mises W-Sq Pr > W-Sq > Anderson-Darling A-Sq Pr > A-Sq > / 96 are often of little value: If you have many observations, the tests are almost allways rejected, because even small differences can be detected, even though they are of litte practical relevance (T-tests and ANOVA are quite robust). If you have few observations, the tests are allmost allways accepted, even if there may be important discrepancies - simply because we do not have enough power. Recall: Accepting a statistical test does not mean that you have proven it to be true! 78 / 96 Model checks: All in one Diagnostics Panel ods graphics on; proc glm plots=diagnosticspanel data=q10; class laboratory; model mass=laboratory / solution clparm; ods graphics off; produces a Diagnostics Panel, containing (among others) in first column (C1, see next page) Figure (R1,C1): residuals vs. predicted values We have seen that previously (p. 74), it looks OK Figure (R2-R3,C1): Quantile plot and histogram, for residuals: We have seen these previously (p. 76), they look quite OK, maybe with a tough of skewness (more tail to the right, i.e. large values), and hammock-shaped quantile plot 79 / / 96

21 Comparisons between groups Mass significance Automatically, we get comparisons between the reference group and all others, i.e. 3 comparisons If the omnibus test of equality is rejected, we may want to perform all pairwise comparisons between the groups, i.e. a total of K = 4 3/2 = 6 comparisons. This may well create problems in connection to type I error (will increase dramatically) Confidence intervals (with be misleadingly narrow) Suppose all laboratories perform truely identical Every pairwise comparison has a type I error rate of α (0.05), i.e. a probability of 1 α for a correct decision K such independent comparisons yield a probability of (1 α) K for getting them all correct i.e. a probability of 1 (1 α) K for getting at least one false significance, i.e. the type I error rate for the total procedure 81 / / 96 Risk of Type I error in multiple comparisons Correction for inflated type I error Adjusted significance level for K group comparisons (here K = 6), Control the experimentwise error rate by lowering the level of significance to α K, e.g. x All comparisons o Comparisons to reference group only Bonferroni : α K α K Sidak : α K = 1 (1 α) 1/K Others : may exist in specific contexts, here Tukey (or Tukey-Kramer) 83 / / 96

22 Adjusted P-values Confidence limits K group comparisons, Increase the P-value to P K, e.g. Bonferroni : Multiply by K, i.e., P K = K P may become greater than 1! Sidak : P K = 1 (1 P) K never larger than 1 Others : may exist in specific contexts Consequence: A reduction in power (increase of type II error rate) Differences become harder to detect If each single confidence interval is constructed to have an (approximate) coverage of 95%, then the simultaneous coverage rate (for all parameters) will be less than 95%, and it will be appreciably less if many intervals are involved. Adjustment: Use alternative quantiles for the construction, e.g. the (1 α K /2) quantile, where α K is the adjusted significance level (according to some rule). 85 / / 96 But Tukey correction in SAS Pairwise tests are not independent! If two groups look alike, they both resemble a third group equally much. Therefore, Bonferroni and Sidak are conservative Significance level α K is unneccessary low We get unneccessarily low power, i.e. Differences are too hard to detect 87 / 96 proc glm data=q10; class laboratory; model mass=laboratory / solution clparm; lsmeans laboratory / adjust=tukey pdiff cl; which gives the output Least Squares Means Adjustment for Multiple Comparisons: Tukey Least Squares Means for effect laboratory Pr > t for H0: LSMean(i)=LSMean(j) Dependent Variable: mass i/j / 96

23 Output, cont d Repeatability and reproducibility laboratory mass LSMEAN 95% Confidence Limits A B C D Least Squares Means for Effect laboratory Difference Simultaneous 95% Between Confidence Limits for i j Means LSMean(i)-LSMean(j) Is this what we wanted to know? 89 / 96 will be elaborated upon in the days to come... Repeatability: How close is the result when we perform repeated observations, which in principle should be identical, i.e. from the same laboratory: Variation of y gi1 y gi2 Reproducibility: How close can we reproduce the result in another setting, which in principle should be the same, i.e. on another laboratory: Variation of y g1 i 1 y g2 i 2 Uncertainty in measurement: How far from the true value can our measurements be expected to be? 90 / 96 Repeatability Reproducibility The ability to repeat the measurements is reflected by the standard deviation σ (the variation within laboratory), or the variance σ 2 which we have estimated to be (see p. 70) s 2 = , s = We can now calulate the standard deviation of the difference y gi1 y gi2 as 2 s 2 = = We will therefore expect these differences to be in the interval ± = ( 0.862, 0.862) The ability to reproduce the measurements in another laboratory will depend on the variation between laboratories, as well as the variation within laboratory. We cannot evaluate this as long as we have a model with specific mean values for each laboratory. We need a model with two variance components: ω 2 : The variation between (infinitely precise) measurements from different laboratories σ 2 : The variation between measurements from the same laboratory 91 / / 96

24 Repeatability and reproducibility Calculations from output proc mixed data=q10; class laboratory; model mass= / s cl; random intercept / subject=laboratory; with output Covariance Parameter Estimates Cov Parm Subject Estimate Intercept laboratory Residual Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > t Alpha Intercept < We got the estimates ˆω 2 = , ˆσ 2 = From this, we calculate (see p. 91) Repeatability: ˆσ 2 = Typical (reference) region for y gi1 y gi2 : ±0.86 Reproducibility: ˆω 2 + ˆσ 2 = Typical (reference) region for y g1 i 1 y g2 i 2 : ±1.25 Uncertainty in measurement: Typical departure from truth: ±0.88 Effect Lower Upper Intercept / / 96 The Gene Expression example The Gene Expression example Remember the paired situation Comparison of the four conditions is not a 1-way ANOVA since we have related samples We may use two different approaches: 1. A two-way ANOVA, with two factors: Condition Cell line 2. A mixed model (variance components model), with an mean value for each Condition a random effect of cell line (between cell-line variation) a within cell-line variation Things to avoid, when analyzing your data: Normalization by dividing or subtracting Control measurements from the rest 95 / / 96

Regression models. Categorical covariate, Quantitative outcome. Examples of categorical covariates. Group characteristics. Faculty of Health Sciences

Regression models. Categorical covariate, Quantitative outcome. Examples of categorical covariates. Group characteristics. Faculty of Health Sciences Faculty of Health Sciences Categorical covariate, Quantitative outcome Regression models Categorical covariate, Quantitative outcome Lene Theil Skovgaard April 29, 2013 PKA & LTS, Sect. 3.2, 3.2.1 ANOVA

More information

Statistics for exp. medical researchers Regression and Correlation

Statistics for exp. medical researchers Regression and Correlation Faculty of Health Sciences Regression analysis Statistics for exp. medical researchers Regression and Correlation Lene Theil Skovgaard Sept. 28, 2015 Linear regression, Estimation and Testing Confidence

More information

T-test: means of Spock's judge versus all other judges 1 12:10 Wednesday, January 5, judge1 N Mean Std Dev Std Err Minimum Maximum

T-test: means of Spock's judge versus all other judges 1 12:10 Wednesday, January 5, judge1 N Mean Std Dev Std Err Minimum Maximum T-test: means of Spock's judge versus all other judges 1 The TTEST Procedure Variable: pcwomen judge1 N Mean Std Dev Std Err Minimum Maximum OTHER 37 29.4919 7.4308 1.2216 16.5000 48.9000 SPOCKS 9 14.6222

More information

Analysis of variance. April 16, Contents Comparison of several groups

Analysis of variance. April 16, Contents Comparison of several groups Contents Comparison of several groups Analysis of variance April 16, 2009 One-way ANOVA Two-way ANOVA Interaction Model checking Acknowledgement for use of presentation Julie Lyng Forman, Dept. of Biostatistics

More information

Analysis of variance. April 16, 2009

Analysis of variance. April 16, 2009 Analysis of variance April 16, 2009 Contents Comparison of several groups One-way ANOVA Two-way ANOVA Interaction Model checking Acknowledgement for use of presentation Julie Lyng Forman, Dept. of Biostatistics

More information

Analysis of variance and regression. April 17, Contents Comparison of several groups One-way ANOVA. Two-way ANOVA Interaction Model checking

Analysis of variance and regression. April 17, Contents Comparison of several groups One-way ANOVA. Two-way ANOVA Interaction Model checking Analysis of variance and regression Contents Comparison of several groups One-way ANOVA April 7, 008 Two-way ANOVA Interaction Model checking ANOVA, April 008 Comparison of or more groups Julie Lyng Forman,

More information

unadjusted model for baseline cholesterol 22:31 Monday, April 19,

unadjusted model for baseline cholesterol 22:31 Monday, April 19, unadjusted model for baseline cholesterol 22:31 Monday, April 19, 2004 1 Class Level Information Class Levels Values TRETGRP 3 3 4 5 SEX 2 0 1 Number of observations 916 unadjusted model for baseline cholesterol

More information

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS Ravinder Malhotra and Vipul Sharma National Dairy Research Institute, Karnal-132001 The most common use of statistics in dairy science is testing

More information

Outline. Analysis of Variance. Acknowledgements. Comparison of 2 or more groups. Comparison of serveral groups

Outline. Analysis of Variance. Acknowledgements. Comparison of 2 or more groups. Comparison of serveral groups Outline Analysis of Variance Analysis of variance and regression course http://staff.pubhealth.ku.dk/~lts/regression10_2/index.html Comparison of serveral groups Model checking Marc Andersen, mja@statgroup.dk

More information

Outline. Analysis of Variance. Comparison of 2 or more groups. Acknowledgements. Comparison of serveral groups

Outline. Analysis of Variance. Comparison of 2 or more groups. Acknowledgements. Comparison of serveral groups Outline Analysis of Variance Analysis of variance and regression course http://staff.pubhealth.ku.dk/~jufo/varianceregressionf2011.html Comparison of serveral groups Model checking Marc Andersen, mja@statgroup.dk

More information

Analysis of Variance

Analysis of Variance 1 / 70 Analysis of Variance Analysis of variance and regression course http://staff.pubhealth.ku.dk/~lts/regression11_2 Marc Andersen, mja@statgroup.dk Analysis of variance and regression for health researchers,

More information

General Linear Model (Chapter 4)

General Linear Model (Chapter 4) General Linear Model (Chapter 4) Outcome variable is considered continuous Simple linear regression Scatterplots OLS is BLUE under basic assumptions MSE estimates residual variance testing regression coefficients

More information

SAS Procedures Inference about the Line ffl model statement in proc reg has many options ffl To construct confidence intervals use alpha=, clm, cli, c

SAS Procedures Inference about the Line ffl model statement in proc reg has many options ffl To construct confidence intervals use alpha=, clm, cli, c Inference About the Slope ffl As with all estimates, ^fi1 subject to sampling var ffl Because Y jx _ Normal, the estimate ^fi1 _ Normal A linear combination of indep Normals is Normal Simple Linear Regression

More information

Outline. Topic 19 - Inference. The Cell Means Model. Estimates. Inference for Means Differences in cell means Contrasts. STAT Fall 2013

Outline. Topic 19 - Inference. The Cell Means Model. Estimates. Inference for Means Differences in cell means Contrasts. STAT Fall 2013 Topic 19 - Inference - Fall 2013 Outline Inference for Means Differences in cell means Contrasts Multiplicity Topic 19 2 The Cell Means Model Expressed numerically Y ij = µ i + ε ij where µ i is the theoretical

More information

Overview. Prerequisites

Overview. Prerequisites Overview Introduction Practicalities Review of basic ideas Peter Dalgaard Department of Biostatistics University of Copenhagen Structure of the course The normal distribution t tests Determining the size

More information

This is a Randomized Block Design (RBD) with a single factor treatment arrangement (2 levels) which are fixed.

This is a Randomized Block Design (RBD) with a single factor treatment arrangement (2 levels) which are fixed. EXST3201 Chapter 13c Geaghan Fall 2005: Page 1 Linear Models Y ij = µ + βi + τ j + βτij + εijk This is a Randomized Block Design (RBD) with a single factor treatment arrangement (2 levels) which are fixed.

More information

Stat 427/527: Advanced Data Analysis I

Stat 427/527: Advanced Data Analysis I Stat 427/527: Advanced Data Analysis I Review of Chapters 1-4 Sep, 2017 1 / 18 Concepts you need to know/interpret Numerical summaries: measures of center (mean, median, mode) measures of spread (sample

More information

Business Statistics. Lecture 10: Course Review

Business Statistics. Lecture 10: Course Review Business Statistics Lecture 10: Course Review 1 Descriptive Statistics for Continuous Data Numerical Summaries Location: mean, median Spread or variability: variance, standard deviation, range, percentiles,

More information

Linear Combinations of Group Means

Linear Combinations of Group Means Linear Combinations of Group Means Look at the handicap example on p. 150 of the text. proc means data=mth567.disability; class handicap; var score; proc sort data=mth567.disability; by handicap; proc

More information

df=degrees of freedom = n - 1

df=degrees of freedom = n - 1 One sample t-test test of the mean Assumptions: Independent, random samples Approximately normal distribution (from intro class: σ is unknown, need to calculate and use s (sample standard deviation)) Hypotheses:

More information

SAS Commands. General Plan. Output. Construct scatterplot / interaction plot. Run full model

SAS Commands. General Plan. Output. Construct scatterplot / interaction plot. Run full model Topic 23 - Unequal Replication Data Model Outline - Fall 2013 Parameter Estimates Inference Topic 23 2 Example Page 954 Data for Two Factor ANOVA Y is the response variable Factor A has levels i = 1, 2,...,

More information

One-way ANOVA Model Assumptions

One-way ANOVA Model Assumptions One-way ANOVA Model Assumptions STAT:5201 Week 4: Lecture 1 1 / 31 One-way ANOVA: Model Assumptions Consider the single factor model: Y ij = µ + α }{{} i ij iid with ɛ ij N(0, σ 2 ) mean structure random

More information

Outline. PubH 5450 Biostatistics I Prof. Carlin. Confidence Interval for the Mean. Part I. Reviews

Outline. PubH 5450 Biostatistics I Prof. Carlin. Confidence Interval for the Mean. Part I. Reviews Outline Outline PubH 5450 Biostatistics I Prof. Carlin Lecture 11 Confidence Interval for the Mean Known σ (population standard deviation): Part I Reviews σ x ± z 1 α/2 n Small n, normal population. Large

More information

Outline. Topic 20 - Diagnostics and Remedies. Residuals. Overview. Diagnostics Plots Residual checks Formal Tests. STAT Fall 2013

Outline. Topic 20 - Diagnostics and Remedies. Residuals. Overview. Diagnostics Plots Residual checks Formal Tests. STAT Fall 2013 Topic 20 - Diagnostics and Remedies - Fall 2013 Diagnostics Plots Residual checks Formal Tests Remedial Measures Outline Topic 20 2 General assumptions Overview Normally distributed error terms Independent

More information

Chapter 8 (More on Assumptions for the Simple Linear Regression)

Chapter 8 (More on Assumptions for the Simple Linear Regression) EXST3201 Chapter 8b Geaghan Fall 2005: Page 1 Chapter 8 (More on Assumptions for the Simple Linear Regression) Your textbook considers the following assumptions: Linearity This is not something I usually

More information

Introduction to Crossover Trials

Introduction to Crossover Trials Introduction to Crossover Trials Stat 6500 Tutorial Project Isaac Blackhurst A crossover trial is a type of randomized control trial. It has advantages over other designed experiments because, under certain

More information

Answer Keys to Homework#10

Answer Keys to Homework#10 Answer Keys to Homework#10 Problem 1 Use either restricted or unrestricted mixed models. Problem 2 (a) First, the respective means for the 8 level combinations are listed in the following table A B C Mean

More information

Multi-factor analysis of variance

Multi-factor analysis of variance Faculty of Health Sciences Outline Multi-factor analysis of variance Basic statistics for experimental researchers 2015 Two-way ANOVA and interaction Mathed samples ANOVA Random vs systematic variation

More information

Assignment 9 Answer Keys

Assignment 9 Answer Keys Assignment 9 Answer Keys Problem 1 (a) First, the respective means for the 8 level combinations are listed in the following table A B C Mean 26.00 + 34.67 + 39.67 + + 49.33 + 42.33 + + 37.67 + + 54.67

More information

Biological Applications of ANOVA - Examples and Readings

Biological Applications of ANOVA - Examples and Readings BIO 575 Biological Applications of ANOVA - Winter Quarter 2010 Page 1 ANOVA Pac Biological Applications of ANOVA - Examples and Readings One-factor Model I (Fixed Effects) This is the same example for

More information

PLS205!! Lab 9!! March 6, Topic 13: Covariance Analysis

PLS205!! Lab 9!! March 6, Topic 13: Covariance Analysis PLS205!! Lab 9!! March 6, 2014 Topic 13: Covariance Analysis Covariable as a tool for increasing precision Carrying out a full ANCOVA Testing ANOVA assumptions Happiness! Covariable as a Tool for Increasing

More information

Odor attraction CRD Page 1

Odor attraction CRD Page 1 Odor attraction CRD Page 1 dm'log;clear;output;clear'; options ps=512 ls=99 nocenter nodate nonumber nolabel FORMCHAR=" ---- + ---+= -/\*"; ODS LISTING; *** Table 23.2 ********************************************;

More information

Topic 17 - Single Factor Analysis of Variance. Outline. One-way ANOVA. The Data / Notation. One way ANOVA Cell means model Factor effects model

Topic 17 - Single Factor Analysis of Variance. Outline. One-way ANOVA. The Data / Notation. One way ANOVA Cell means model Factor effects model Topic 17 - Single Factor Analysis of Variance - Fall 2013 One way ANOVA Cell means model Factor effects model Outline Topic 17 2 One-way ANOVA Response variable Y is continuous Explanatory variable is

More information

COMPREHENSIVE WRITTEN EXAMINATION, PAPER III FRIDAY AUGUST 26, 2005, 9:00 A.M. 1:00 P.M. STATISTICS 174 QUESTION

COMPREHENSIVE WRITTEN EXAMINATION, PAPER III FRIDAY AUGUST 26, 2005, 9:00 A.M. 1:00 P.M. STATISTICS 174 QUESTION COMPREHENSIVE WRITTEN EXAMINATION, PAPER III FRIDAY AUGUST 26, 2005, 9:00 A.M. 1:00 P.M. STATISTICS 174 QUESTION Answer all parts. Closed book, calculators allowed. It is important to show all working,

More information

dm'log;clear;output;clear'; options ps=512 ls=99 nocenter nodate nonumber nolabel FORMCHAR=" = -/\<>*"; ODS LISTING;

dm'log;clear;output;clear'; options ps=512 ls=99 nocenter nodate nonumber nolabel FORMCHAR= = -/\<>*; ODS LISTING; dm'log;clear;output;clear'; options ps=512 ls=99 nocenter nodate nonumber nolabel FORMCHAR=" ---- + ---+= -/\*"; ODS LISTING; *** Table 23.2 ********************************************; *** Moore, David

More information

Week 7.1--IES 612-STA STA doc

Week 7.1--IES 612-STA STA doc Week 7.1--IES 612-STA 4-573-STA 4-576.doc IES 612/STA 4-576 Winter 2009 ANOVA MODELS model adequacy aka RESIDUAL ANALYSIS Numeric data samples from t populations obtained Assume Y ij ~ independent N(μ

More information

Two Sample Problems. Two sample problems

Two Sample Problems. Two sample problems Two Sample Problems Two sample problems The goal of inference is to compare the responses in two groups. Each group is a sample from a different population. The responses in each group are independent

More information

Lecture 18: Simple Linear Regression

Lecture 18: Simple Linear Regression Lecture 18: Simple Linear Regression BIOS 553 Department of Biostatistics University of Michigan Fall 2004 The Correlation Coefficient: r The correlation coefficient (r) is a number that measures the strength

More information

6. Multiple regression - PROC GLM

6. Multiple regression - PROC GLM Use of SAS - November 2016 6. Multiple regression - PROC GLM Karl Bang Christensen Department of Biostatistics, University of Copenhagen. http://biostat.ku.dk/~kach/sas2016/ kach@biostat.ku.dk, tel: 35327491

More information

Answer to exercise: Blood pressure lowering drugs

Answer to exercise: Blood pressure lowering drugs Answer to exercise: Blood pressure lowering drugs The data set bloodpressure.txt contains data from a cross-over trial, involving three different formulations of a drug for lowering of blood pressure:

More information

5.3 Three-Stage Nested Design Example

5.3 Three-Stage Nested Design Example 5.3 Three-Stage Nested Design Example A researcher designs an experiment to study the of a metal alloy. A three-stage nested design was conducted that included Two alloy chemistry compositions. Three ovens

More information

Topic 23: Diagnostics and Remedies

Topic 23: Diagnostics and Remedies Topic 23: Diagnostics and Remedies Outline Diagnostics residual checks ANOVA remedial measures Diagnostics Overview We will take the diagnostics and remedial measures that we learned for regression and

More information

Descriptions of post-hoc tests

Descriptions of post-hoc tests Experimental Statistics II Page 81 Descriptions of post-hoc tests Post-hoc or Post-ANOVA tests! Once you have found out some treatment(s) are different, how do you determine which one(s) are different?

More information

1) Answer the following questions as true (T) or false (F) by circling the appropriate letter.

1) Answer the following questions as true (T) or false (F) by circling the appropriate letter. 1) Answer the following questions as true (T) or false (F) by circling the appropriate letter. T F T F T F a) Variance estimates should always be positive, but covariance estimates can be either positive

More information

EXST7015: Estimating tree weights from other morphometric variables Raw data print

EXST7015: Estimating tree weights from other morphometric variables Raw data print Simple Linear Regression SAS example Page 1 1 ********************************************; 2 *** Data from Freund & Wilson (1993) ***; 3 *** TABLE 8.24 : ESTIMATING TREE WEIGHTS ***; 4 ********************************************;

More information

1-Way ANOVA MATH 143. Spring Department of Mathematics and Statistics Calvin College

1-Way ANOVA MATH 143. Spring Department of Mathematics and Statistics Calvin College 1-Way ANOVA MATH 143 Department of Mathematics and Statistics Calvin College Spring 2010 The basic ANOVA situation Two variables: 1 Categorical, 1 Quantitative Main Question: Do the (means of) the quantitative

More information

Regression: Main Ideas Setting: Quantitative outcome with a quantitative explanatory variable. Example, cont.

Regression: Main Ideas Setting: Quantitative outcome with a quantitative explanatory variable. Example, cont. TCELL 9/4/205 36-309/749 Experimental Design for Behavioral and Social Sciences Simple Regression Example Male black wheatear birds carry stones to the nest as a form of sexual display. Soler et al. wanted

More information

Repeated Measures Part 2: Cartoon data

Repeated Measures Part 2: Cartoon data Repeated Measures Part 2: Cartoon data /*********************** cartoonglm.sas ******************/ options linesize=79 noovp formdlim='_'; title 'Cartoon Data: STA442/1008 F 2005'; proc format; /* value

More information

ST505/S697R: Fall Homework 2 Solution.

ST505/S697R: Fall Homework 2 Solution. ST505/S69R: Fall 2012. Homework 2 Solution. 1. 1a; problem 1.22 Below is the summary information (edited) from the regression (using R output); code at end of solution as is code and output for SAS. a)

More information

Chapter 11. Analysis of Variance (One-Way)

Chapter 11. Analysis of Variance (One-Way) Chapter 11 Analysis of Variance (One-Way) We now develop a statistical procedure for comparing the means of two or more groups, known as analysis of variance or ANOVA. These groups might be the result

More information

Chapter 20 : Two factor studies one case per treatment Chapter 21: Randomized complete block designs

Chapter 20 : Two factor studies one case per treatment Chapter 21: Randomized complete block designs Chapter 20 : Two factor studies one case per treatment Chapter 21: Randomized complete block designs Adapted from Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis

More information

In many situations, there is a non-parametric test that corresponds to the standard test, as described below:

In many situations, there is a non-parametric test that corresponds to the standard test, as described below: There are many standard tests like the t-tests and analyses of variance that are commonly used. They rest on assumptions like normality, which can be hard to assess: for example, if you have small samples,

More information

36-309/749 Experimental Design for Behavioral and Social Sciences. Sep. 22, 2015 Lecture 4: Linear Regression

36-309/749 Experimental Design for Behavioral and Social Sciences. Sep. 22, 2015 Lecture 4: Linear Regression 36-309/749 Experimental Design for Behavioral and Social Sciences Sep. 22, 2015 Lecture 4: Linear Regression TCELL Simple Regression Example Male black wheatear birds carry stones to the nest as a form

More information

4.8 Alternate Analysis as a Oneway ANOVA

4.8 Alternate Analysis as a Oneway ANOVA 4.8 Alternate Analysis as a Oneway ANOVA Suppose we have data from a two-factor factorial design. The following method can be used to perform a multiple comparison test to compare treatment means as well

More information

Inferences About the Difference Between Two Means

Inferences About the Difference Between Two Means 7 Inferences About the Difference Between Two Means Chapter Outline 7.1 New Concepts 7.1.1 Independent Versus Dependent Samples 7.1. Hypotheses 7. Inferences About Two Independent Means 7..1 Independent

More information

1 Tomato yield example.

1 Tomato yield example. ST706 - Linear Models II. Spring 2013 Two-way Analysis of Variance examples. Here we illustrate what happens analyzing two way data in proc glm in SAS. Similar issues come up with other software where

More information

Review of Statistics 101

Review of Statistics 101 Review of Statistics 101 We review some important themes from the course 1. Introduction Statistics- Set of methods for collecting/analyzing data (the art and science of learning from data). Provides methods

More information

BIOL Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES

BIOL Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES BIOL 458 - Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES PART 1: INTRODUCTION TO ANOVA Purpose of ANOVA Analysis of Variance (ANOVA) is an extremely useful statistical method

More information

IES 612/STA 4-573/STA Winter 2008 Week 1--IES 612-STA STA doc

IES 612/STA 4-573/STA Winter 2008 Week 1--IES 612-STA STA doc IES 612/STA 4-573/STA 4-576 Winter 2008 Week 1--IES 612-STA 4-573-STA 4-576.doc Review Notes: [OL] = Ott & Longnecker Statistical Methods and Data Analysis, 5 th edition. [Handouts based on notes prepared

More information

Example: Four levels of herbicide strength in an experiment on dry weight of treated plants.

Example: Four levels of herbicide strength in an experiment on dry weight of treated plants. The idea of ANOVA Reminders: A factor is a variable that can take one of several levels used to differentiate one group from another. An experiment has a one-way, or completely randomized, design if several

More information

K. Model Diagnostics. residuals ˆɛ ij = Y ij ˆµ i N = Y ij Ȳ i semi-studentized residuals ω ij = ˆɛ ij. studentized deleted residuals ɛ ij =

K. Model Diagnostics. residuals ˆɛ ij = Y ij ˆµ i N = Y ij Ȳ i semi-studentized residuals ω ij = ˆɛ ij. studentized deleted residuals ɛ ij = K. Model Diagnostics We ve already seen how to check model assumptions prior to fitting a one-way ANOVA. Diagnostics carried out after model fitting by using residuals are more informative for assessing

More information

22s:152 Applied Linear Regression. Chapter 8: 1-Way Analysis of Variance (ANOVA) 2-Way Analysis of Variance (ANOVA)

22s:152 Applied Linear Regression. Chapter 8: 1-Way Analysis of Variance (ANOVA) 2-Way Analysis of Variance (ANOVA) 22s:152 Applied Linear Regression Chapter 8: 1-Way Analysis of Variance (ANOVA) 2-Way Analysis of Variance (ANOVA) We now consider an analysis with only categorical predictors (i.e. all predictors are

More information

Correlated data. Variance component models. Example: Evaluate vaccine. Traditional assumption so far. Faculty of Health Sciences

Correlated data. Variance component models. Example: Evaluate vaccine. Traditional assumption so far. Faculty of Health Sciences Faculty of Health Sciences Variance component models Definitions and motivation Correlated data Variance component models, I Lene Theil Skovgaard November 29, 2013 One-way anova with random variation The

More information

Topic 20: Single Factor Analysis of Variance

Topic 20: Single Factor Analysis of Variance Topic 20: Single Factor Analysis of Variance Outline Single factor Analysis of Variance One set of treatments Cell means model Factor effects model Link to linear regression using indicator explanatory

More information

WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS

WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS 1 WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS I. Single-factor designs: the model is: yij i j ij ij where: yij score for person j under treatment level i (i = 1,..., I; j = 1,..., n) overall mean βi treatment

More information

DETAILED CONTENTS PART I INTRODUCTION AND DESCRIPTIVE STATISTICS. 1. Introduction to Statistics

DETAILED CONTENTS PART I INTRODUCTION AND DESCRIPTIVE STATISTICS. 1. Introduction to Statistics DETAILED CONTENTS About the Author Preface to the Instructor To the Student How to Use SPSS With This Book PART I INTRODUCTION AND DESCRIPTIVE STATISTICS 1. Introduction to Statistics 1.1 Descriptive and

More information

STATISTICS 479 Exam II (100 points)

STATISTICS 479 Exam II (100 points) Name STATISTICS 79 Exam II (1 points) 1. A SAS data set was created using the following input statement: Answer parts(a) to (e) below. input State $ City $ Pop199 Income Housing Electric; (a) () Give the

More information

STAT 705 Chapter 19: Two-way ANOVA

STAT 705 Chapter 19: Two-way ANOVA STAT 705 Chapter 19: Two-way ANOVA Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 38 Two-way ANOVA Material covered in Sections 19.2 19.4, but a bit

More information

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3.1 through 3.3

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3.1 through 3.3 Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3.1 through 3.3 Fall, 2013 Page 1 Tensile Strength Experiment Investigate the tensile strength of a new synthetic fiber. The factor is the

More information

Handout 1: Predicting GPA from SAT

Handout 1: Predicting GPA from SAT Handout 1: Predicting GPA from SAT appsrv01.srv.cquest.utoronto.ca> appsrv01.srv.cquest.utoronto.ca> ls Desktop grades.data grades.sas oldstuff sasuser.800 appsrv01.srv.cquest.utoronto.ca> cat grades.data

More information

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3-1 through 3-3

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3-1 through 3-3 Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3-1 through 3-3 Page 1 Tensile Strength Experiment Investigate the tensile strength of a new synthetic fiber. The factor is the weight percent

More information

N J SS W /df W N - 1

N J SS W /df W N - 1 One-Way ANOVA Source Table ANOVA MODEL: ij = µ* + α j + ε ij H 0 : µ = µ =... = µ j or H 0 : Σα j = 0 Source Sum of Squares df Mean Squares F J Between Groups nj( j * ) J - SS B /(J ) MS B /MS W = ( N

More information

Tentative solutions TMA4255 Applied Statistics 16 May, 2015

Tentative solutions TMA4255 Applied Statistics 16 May, 2015 Norwegian University of Science and Technology Department of Mathematical Sciences Page of 9 Tentative solutions TMA455 Applied Statistics 6 May, 05 Problem Manufacturer of fertilizers a) Are these independent

More information

ECO220Y Simple Regression: Testing the Slope

ECO220Y Simple Regression: Testing the Slope ECO220Y Simple Regression: Testing the Slope Readings: Chapter 18 (Sections 18.3-18.5) Winter 2012 Lecture 19 (Winter 2012) Simple Regression Lecture 19 1 / 32 Simple Regression Model y i = β 0 + β 1 x

More information

Correlation and Simple Linear Regression

Correlation and Simple Linear Regression Correlation and Simple Linear Regression Sasivimol Rattanasiri, Ph.D Section for Clinical Epidemiology and Biostatistics Ramathibodi Hospital, Mahidol University E-mail: sasivimol.rat@mahidol.ac.th 1 Outline

More information

Exam details. Final Review Session. Things to Review

Exam details. Final Review Session. Things to Review Exam details Final Review Session Short answer, similar to book problems Formulae and tables will be given You CAN use a calculator Date and Time: Dec. 7, 006, 1-1:30 pm Location: Osborne Centre, Unit

More information

Degrees of freedom df=1. Limitations OR in SPSS LIM: Knowing σ and µ is unlikely in large

Degrees of freedom df=1. Limitations OR in SPSS LIM: Knowing σ and µ is unlikely in large Z Test Comparing a group mean to a hypothesis T test (about 1 mean) T test (about 2 means) Comparing mean to sample mean. Similar means = will have same response to treatment Two unknown means are different

More information

Glossary. The ISI glossary of statistical terms provides definitions in a number of different languages:

Glossary. The ISI glossary of statistical terms provides definitions in a number of different languages: Glossary The ISI glossary of statistical terms provides definitions in a number of different languages: http://isi.cbs.nl/glossary/index.htm Adjusted r 2 Adjusted R squared measures the proportion of the

More information

PLS205 Lab 2 January 15, Laboratory Topic 3

PLS205 Lab 2 January 15, Laboratory Topic 3 PLS205 Lab 2 January 15, 2015 Laboratory Topic 3 General format of ANOVA in SAS Testing the assumption of homogeneity of variances by "/hovtest" by ANOVA of squared residuals Proc Power for ANOVA One-way

More information

Variance component models part I

Variance component models part I Faculty of Health Sciences Variance component models part I Analysis of repeated measurements, 30th November 2012 Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics, University of Copenhagen

More information

Simple linear regression

Simple linear regression Simple linear regression Biometry 755 Spring 2008 Simple linear regression p. 1/40 Overview of regression analysis Evaluate relationship between one or more independent variables (X 1,...,X k ) and a single

More information

PubH 7405: REGRESSION ANALYSIS SLR: DIAGNOSTICS & REMEDIES

PubH 7405: REGRESSION ANALYSIS SLR: DIAGNOSTICS & REMEDIES PubH 7405: REGRESSION ANALYSIS SLR: DIAGNOSTICS & REMEDIES Normal Error RegressionModel : Y = β 0 + β ε N(0,σ 2 1 x ) + ε The Model has several parts: Normal Distribution, Linear Mean, Constant Variance,

More information

R 2 and F -Tests and ANOVA

R 2 and F -Tests and ANOVA R 2 and F -Tests and ANOVA December 6, 2018 1 Partition of Sums of Squares The distance from any point y i in a collection of data, to the mean of the data ȳ, is the deviation, written as y i ȳ. Definition.

More information

Basics on t-tests Independent Sample t-tests Single-Sample t-tests Summary of t-tests Multiple Tests, Effect Size Proportions. Statistiek I.

Basics on t-tests Independent Sample t-tests Single-Sample t-tests Summary of t-tests Multiple Tests, Effect Size Proportions. Statistiek I. Statistiek I t-tests John Nerbonne CLCG, Rijksuniversiteit Groningen http://www.let.rug.nl/nerbonne/teach/statistiek-i/ John Nerbonne 1/46 Overview 1 Basics on t-tests 2 Independent Sample t-tests 3 Single-Sample

More information

22s:152 Applied Linear Regression. 1-way ANOVA visual:

22s:152 Applied Linear Regression. 1-way ANOVA visual: 22s:152 Applied Linear Regression 1-way ANOVA visual: Chapter 8: 1-Way Analysis of Variance (ANOVA) 2-Way Analysis of Variance (ANOVA) 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 Y We now consider an analysis

More information

Chapter 1 Statistical Inference

Chapter 1 Statistical Inference Chapter 1 Statistical Inference causal inference To infer causality, you need a randomized experiment (or a huge observational study and lots of outside information). inference to populations Generalizations

More information

401 Review. 6. Power analysis for one/two-sample hypothesis tests and for correlation analysis.

401 Review. 6. Power analysis for one/two-sample hypothesis tests and for correlation analysis. 401 Review Major topics of the course 1. Univariate analysis 2. Bivariate analysis 3. Simple linear regression 4. Linear algebra 5. Multiple regression analysis Major analysis methods 1. Graphical analysis

More information

Lecture 3: Inference in SLR

Lecture 3: Inference in SLR Lecture 3: Inference in SLR STAT 51 Spring 011 Background Reading KNNL:.1.6 3-1 Topic Overview This topic will cover: Review of hypothesis testing Inference about 1 Inference about 0 Confidence Intervals

More information

STAT 215 Confidence and Prediction Intervals in Regression

STAT 215 Confidence and Prediction Intervals in Regression STAT 215 Confidence and Prediction Intervals in Regression Colin Reimer Dawson Oberlin College 24 October 2016 Outline Regression Slope Inference Partitioning Variability Prediction Intervals Reminder:

More information

BE640 Intermediate Biostatistics 2. Regression and Correlation. Simple Linear Regression Software: SAS. Emergency Calls to the New York Auto Club

BE640 Intermediate Biostatistics 2. Regression and Correlation. Simple Linear Regression Software: SAS. Emergency Calls to the New York Auto Club BE640 Intermediate Biostatistics 2. Regression and Correlation Simple Linear Regression Software: SAS Emergency Calls to the New York Auto Club Source: Chatterjee, S; Handcock MS and Simonoff JS A Casebook

More information

R in Linguistic Analysis. Wassink 2012 University of Washington Week 6

R in Linguistic Analysis. Wassink 2012 University of Washington Week 6 R in Linguistic Analysis Wassink 2012 University of Washington Week 6 Overview R for phoneticians and lab phonologists Johnson 3 Reading Qs Equivalence of means (t-tests) Multiple Regression Principal

More information

STAT 705 Chapter 19: Two-way ANOVA

STAT 705 Chapter 19: Two-way ANOVA STAT 705 Chapter 19: Two-way ANOVA Adapted from Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 41 Two-way ANOVA This material is covered in Sections

More information

Specific Differences. Lukas Meier, Seminar für Statistik

Specific Differences. Lukas Meier, Seminar für Statistik Specific Differences Lukas Meier, Seminar für Statistik Problem with Global F-test Problem: Global F-test (aka omnibus F-test) is very unspecific. Typically: Want a more precise answer (or have a more

More information

Hypothesis testing, part 2. With some material from Howard Seltman, Blase Ur, Bilge Mutlu, Vibha Sazawal

Hypothesis testing, part 2. With some material from Howard Seltman, Blase Ur, Bilge Mutlu, Vibha Sazawal Hypothesis testing, part 2 With some material from Howard Seltman, Blase Ur, Bilge Mutlu, Vibha Sazawal 1 CATEGORICAL IV, NUMERIC DV 2 Independent samples, one IV # Conditions Normal/Parametric Non-parametric

More information

Module 6: Model Diagnostics

Module 6: Model Diagnostics St@tmaster 02429/MIXED LINEAR MODELS PREPARED BY THE STATISTICS GROUPS AT IMM, DTU AND KU-LIFE Module 6: Model Diagnostics 6.1 Introduction............................... 1 6.2 Linear model diagnostics........................

More information

Inference for Regression Simple Linear Regression

Inference for Regression Simple Linear Regression Inference for Regression Simple Linear Regression IPS Chapter 10.1 2009 W.H. Freeman and Company Objectives (IPS Chapter 10.1) Simple linear regression p Statistical model for linear regression p Estimating

More information

Correlated data. Introduction. We expect students to... Aim of the course. Faculty of Health Sciences. NFA, May 19, 2014.

Correlated data. Introduction. We expect students to... Aim of the course. Faculty of Health Sciences. NFA, May 19, 2014. Faculty of Health Sciences Introduction Correlated data NFA, May 19, 2014 Introduction Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics University of Copenhagen The idea of the course

More information

Inference for Regression Inference about the Regression Model and Using the Regression Line

Inference for Regression Inference about the Regression Model and Using the Regression Line Inference for Regression Inference about the Regression Model and Using the Regression Line PBS Chapter 10.1 and 10.2 2009 W.H. Freeman and Company Objectives (PBS Chapter 10.1 and 10.2) Inference about

More information

22s:152 Applied Linear Regression. Take random samples from each of m populations.

22s:152 Applied Linear Regression. Take random samples from each of m populations. 22s:152 Applied Linear Regression Chapter 8: ANOVA NOTE: We will meet in the lab on Monday October 10. One-way ANOVA Focuses on testing for differences among group means. Take random samples from each

More information

Single Factor Experiments

Single Factor Experiments Single Factor Experiments Bruce A Craig Department of Statistics Purdue University STAT 514 Topic 4 1 Analysis of Variance Suppose you are interested in comparing either a different treatments a levels

More information