Exercise 1 You have a clinical study in which 10 patients will either get the standard treatment or a new treatment Randomize which 5 of the 10 get the.

Slides:



Advertisements
Similar presentations
SJS SDI_101 Design of Statistical Investigations Stephen Senn 10 Random Effects.
Advertisements

Randomized Complete Block and Repeated Measures (Each Subject Receives Each Treatment) Designs KNNL – Chapters 21,
Test of (µ 1 – µ 2 ),  1 =  2, Populations Normal Test Statistic and df = n 1 + n 2 – 2 2– )1– 2 ( 2 1 )1– 1 ( 2 where ] 2 – 1 [–
T-tests continued.
Lecture 10 F-tests in MLR (continued) Coefficients of Determination BMTRY 701 Biostatistical Methods II.
SPH 247 Statistical Analysis of Laboratory Data 1 April 2, 2013 SPH 247 Statistical Analysis of Laboratory Data.
SPH 247 Statistical Analysis of Laboratory Data 1April 2, 2013SPH 247 Statistical Analysis of Laboratory Data.
ANOVA and Linear Models. Data Data is from the University of York project on variation in British liquids. Data is from the University of York project.
Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture #19 Analysis of Designs with Random Factor Levels.
1 Chapter 4 Experiments with Blocking Factors The Randomized Complete Block Design Nuisance factor: a design factor that probably has an effect.
Chapter 4 Randomized Blocks, Latin Squares, and Related Designs
DOCTORAL SEMINAR, SPRING SEMESTER 2007 Experimental Design & Analysis Analysis of Covariance; Within- Subject Designs March 13, 2007.
Random Effects & Repeated Measures Alternatives to Fixed Effects Analyses.
Multilevel modeling in R Tom Dunn and Thom Baguley, Psychology, Nottingham Trent University
Design of Engineering Experiments - Experiments with Random Factors
Experimental Design Terminology  An Experimental Unit is the entity on which measurement or an observation is made. For example, subjects are experimental.
1 Chapter 5 Introduction to Factorial Designs Basic Definitions and Principles Study the effects of two or more factors. Factorial designs Crossed:
Student’s t statistic Use Test for equality of two means
Outline Single-factor ANOVA Two-factor ANOVA Three-factor ANOVA
Analysis of Variance Introduction The Analysis of Variance is abbreviated as ANOVA The Analysis of Variance is abbreviated as ANOVA Used for hypothesis.
Go to Table of ContentTable of Content Analysis of Variance: Randomized Blocks Farrokh Alemi Ph.D. Kashif Haqqi M.D.
Repeated Measures ANOVA Used when the research design contains one factor on which participants are measured more than twice (dependent, or within- groups.
Biostatistics-Lecture 9 Experimental designs Ruibin Xi Peking University School of Mathematical Sciences.
SPH 247 Statistical Analysis of Laboratory Data April 9, 2013SPH 247 Statistical Analysis of Laboratory Data1.
Experimental Design An Experimental Design is a plan for the assignment of the treatments to the plots in the experiment Designs differ primarily in the.
23-1 Analysis of Covariance (Chapter 16) A procedure for comparing treatment means that incorporates information on a quantitative explanatory variable,
Lecture 5 Linear Mixed Effects Models
Two-way ANOVA Introduction to Factorial Designs and their Analysis.
ANOVA (Analysis of Variance) by Aziza Munir
Testing Multiple Means and the Analysis of Variance (§8.1, 8.2, 8.6) Situations where comparing more than two means is important. The approach to testing.
Repeated Measures  The term repeated measures refers to data sets with multiple measurements of a response variable on the same experimental unit or subject.
Chapter 10: Analyzing Experimental Data Inferential statistics are used to determine whether the independent variable had an effect on the dependent variance.
1 A nuisance factor is a factor that probably has some effect on the response, but it’s of no interest to the experimenter…however, the variability it.
Comparing Three or More Means ANOVA (One-Way Analysis of Variance)
The Completely Randomized Design (§8.3)
Intermediate Applied Statistics STAT 460 Lecture 17, 11/10/2004 Instructor: Aleksandra (Seša) Slavković TA: Wang Yu
Lack of Fit (LOF) Test A formal F test for checking whether a specific type of regression function adequately fits the data.
Statistics for Differential Expression Naomi Altman Oct. 06.
Single-Factor Studies KNNL – Chapter 16. Single-Factor Models Independent Variable can be qualitative or quantitative If Quantitative, we typically assume.
ETM U 1 Analysis of Variance (ANOVA) Suppose we want to compare more than two means? For example, suppose a manufacturer of paper used for grocery.
General Linear Model.
1 Experimental Statistics - week 9 Chapter 17: Models with Random Effects Chapter 18: Repeated Measures.
IE241: Introduction to Design of Experiments. Last term we talked about testing the difference between two independent means. For means from a normal.
EPP 245 Statistical Analysis of Laboratory Data 1April 23, 2010SPH 247 Statistical Analysis of Laboratory Data.
Exercise 1 You have a clinical study in which 10 patients will either get the standard treatment or a new treatment Randomize which 5 of the 10 get the.
Exercise 1 You have a clinical study in which 10 patients will either get the standard treatment or a new treatment Randomize which 5 of the 10 get the.
ANOVA Overview of Major Designs. Between or Within Subjects Between-subjects (completely randomized) designs –Subjects are nested within treatment conditions.
Biostatistics Case Studies Peter D. Christenson Biostatistician Session 3: Missing Data in Longitudinal Studies.
Formula for Linear Regression y = bx + a Y variable plotted on vertical axis. X variable plotted on horizontal axis. Slope or the change in y for every.
Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.
1 Experimental Statistics - week 8 Chapter 17: Mixed Models Chapter 18: Repeated Measures.
Advanced Math Topics One-Way Anova. An ANOVA is an ANalysis Of VAriance. It is a table used to see if the means from a number of samples are.
> xyplot(cat~time|id,dd,groups=ses,lty=1:3,type="l") > dd head(dd) id ses cat pre post time
1 Analysis of Variance (ANOVA) EPP 245/298 Statistical Analysis of Laboratory Data.
Effect Sizes for Continuous Variables William R. Shadish University of California, Merced.
Chapter 10 Two-Sample Tests and One-Way ANOVA.
Statistical Data Analysis - Lecture /04/03
Statistical Science 9544A Case Study II.
Effect Sizes (continued)
Factorial Experiments
An Introduction to Two-Way ANOVA
i) Two way ANOVA without replication
Statistics for the Social Sciences
Data Collection and Analysis
Chapter 5 Introduction to Factorial Designs
Random Effects & Repeated Measures
Reasoning in Psychology Using Statistics
Reasoning in Psychology Using Statistics
Factorial ANOVA 2 or More IVs.
Analysis of Variance (ANOVA)
Presentation transcript:

Exercise 1 You have a clinical study in which 10 patients will either get the standard treatment or a new treatment Randomize which 5 of the 10 get the new treatment so that all possible combinations can result. Use Excel or R or another formal randomization method. Instead, randomize so that in each pair of patients entered by date, one has the standard and one the new treatment (blocked randomization). What are the advantages of each method? Why is randomization important? April 2, 2013SPH 247 Statistical Analysis of Laboratory Data1

Exercise 1 Solutions For the first situation, using Excel, you can (for example) put the numbers 1–10 in column A, put five “Treatment” and five “Standard” in column B, put =rand() in column C. Then fix the numbers in column C and sort columns B and C by the random numbers. For the second situation, you can put random numbers in column B and fix them, then in cell C2 (assuming a header row) put =IF(B2<B3,"A","B") and in cell C3 put =IF(B3<B2,"A","B"). Then copy the pair of cells to C4, C6, C8, and C10. Or use “Treatment” and “Standard” instead of “A” and “B”. There are many other ways to do this. April 2, 2013SPH 247 Statistical Analysis of Laboratory Data2

April 2, 2013SPH 247 Statistical Analysis of Laboratory Data3 PatientRandomTreatment A A A A A B B B B B PatientRandomTreatment A B B A A B A B A B Before SortingAfter Sorting

April 2, 2013SPH 247 Statistical Analysis of Laboratory Data4 PatientRandomTreatment A B B A A B A B B A IF(C2<C3,"A","B") IF(C3<C2,"A","B") IF(C4<C5,"A","B") IF(C5<C4,"A","B") IF(C6<C7,"A","B") IF(C7<C6,"A","B") IF(C8<C9,"A","B") IF(C9<C8,"A","B") IF(C10<C11,"A","B") IF(C11<C10,"A","B")

Comments Randomization is important to avoid bias, approximately balance covariates, and provide a basis for analysis. Blocked randomization can better control for time effects, but this particular version risks unblinding the next patient. April 2, 2013SPH 247 Statistical Analysis of Laboratory Data5

Exercise 2 Analyze the testosterone levels from Rosner’s endocrin data set in the same way as we did for the estradiol levels, using anova(lm()) Reanalyze estradiol and testosterone using lme() and verify that the results are the same. Here is the specification lme(Testosterone ~ 1, random = ~1 | Subject,data=endocrin) Repeat the analysis of the coop data for specimens 2 and 5 separately. Do the analysis both with the traditional ANOVA tables using lm() and with lme() and compare the results April 2, 2013SPH 247 Statistical Analysis of Laboratory Data6

April 2, 2013SPH 247 Statistical Analysis of Laboratory Data7 > anova(lm(Testosterone ~ Subject,data=endocrin)) Analysis of Variance Table Response: Testosterone Df Sum Sq Mean Sq F value Pr(>F) Subject ** Residuals Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Replication error variance is 6.484, so the standard deviation of replicates is 2.55 pg/mL This compared to average levels across subjects from to Estimated variance across subjects is ( − 6.484)/2 = Standard deviation across subjects is 8.26 pg/mL If we average the replicates, we get five values, the standard deviation of which is This contains both the subject and replication variance.

April 2, 2013SPH 247 Statistical Analysis of Laboratory Data8 > lme(Estradiol ~ 1, random = ~1 | Subject,data=endocrin) Linear mixed-effects model fit by REML Data: endocrin Log-restricted-likelihood: Fixed: Estradiol ~ 1 (Intercept) Random effects: Formula: ~1 | Subject (Intercept) Residual StdDev: Number of Observations: 10 Number of Groups: 5 > lme(Testosterone ~ 1, random = ~1 | Subject,data=endocrin) Linear mixed-effects model fit by REML Data: endocrin Log-restricted-likelihood: Fixed: Testosterone ~ 1 (Intercept) 25.3 Random effects: Formula: ~1 | Subject (Intercept) Residual StdDev: Number of Observations: 10 Number of Groups: 5

Specimen 2 > anova(lm(Conc ~ Lab + Lab:Bat,data=coop,sub=Spc=="S2")) Analysis of Variance Table Response: Conc Df Sum Sq Mean Sq F value Pr(>F) Lab e-14 *** Lab:Bat e-08 *** Residuals April 2, 2013SPH 247 Statistical Analysis of Laboratory Data9 The test for batch-in-lab is correct, but the test for lab is not—the denominator should be The Lab:Bat MS, so F(5,12) = / = so p = , still significant The residual variance is (sd=0.0787). The estimated batch variance within labs is ( − )/2 = (sd = ). The estimated lab variance is ( − )/(3×2) = (sd = )

> lme(Conc ~1, random = ~1 | Lab/Bat,sub=Spc=="S2",data=coop) Linear mixed-effects model fit by REML Data: coop Subset: Spc == "S2" Log-restricted-likelihood: Fixed: Conc ~ 1 (Intercept) Random effects: Formula: ~1 | Lab (Intercept) StdDev: Formula: ~1 | Bat %in% Lab (Intercept) Residual StdDev: Number of Observations: 36 Number of Groups: Lab Bat %in% Lab 6 18 April 2, 2013SPH 247 Statistical Analysis of Laboratory Data10 The standard deviations for Lab, Batch, and Residual exactly match those from the lm() analysis

Specimen 5 > anova(lm(Conc ~ Lab + Lab:Bat,data=coop,sub=Spc=="S5")) Analysis of Variance Table Response: Conc Df Sum Sq Mean Sq F value Pr(>F) Lab e-08 *** Lab:Bat *** Residuals Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 April 2, 2013SPH 247 Statistical Analysis of Laboratory Data11 The test for batch-in-lab is correct, but the test for lab is not—the denominator should be The Lab:Bat MS, so F(5,12) = / = so p = , still significant The residual variance is (sd=0.3110). The estimated batch variance within labs is ( −0.0967)/2 = (sd = ). The estimated lab variance is ( − )/(3×2) = (sd = )

> lme(Conc ~1, random = ~1 | Lab/Bat,sub=Spc=="S5",data=coop) Linear mixed-effects model fit by REML Data: coop Subset: Spc == "S5" Log-restricted-likelihood: Fixed: Conc ~ 1 (Intercept) Random effects: Formula: ~1 | Lab (Intercept) StdDev: Formula: ~1 | Bat %in% Lab (Intercept) Residual StdDev: Number of Observations: 36 Number of Groups: Lab Bat %in% Lab 6 18 April 2, 2013SPH 247 Statistical Analysis of Laboratory Data12 The standard deviations for Lab, Batch, and Residual exactly match those from the lm() analysis