Multi-factor analysis of variance

Size: px
Start display at page:

Download "Multi-factor analysis of variance"

Transcription

1 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 Julie Lyng Forman Department of Biostatistics, University of Copenhagen Mixed models Repeatability and reproducibility 2 / 68 Two-way analysis of variance Example: Fibrinogen after spleen removal What is the effect of two treatments in combination? B A 1 2 c 1 2. r. Effect of treatment A? Effect of treatment B? Do the two treatments interact? Randomized experiment with 34 rats. Two treatments: splenectomy (yes/no): 17 have their spleen removed. altitude (high/normal) 8 in each group at high altitude. Outcome: Serum fibrinogen (mg) after 21 days. Quantification / test of interaction Possible with multiple observations for each combination. not possible with one observation for each combination. Note: one measurement on each rat - we have independent data. 3 / 68 4 / 68

2 Data from combined treatment groups Interactionplot Sample means for combined treatments: Altitude Spleen Mean (SD) High No 440 (99) High Yes 352 (93) Normal No 366 (66) Normal Yes 261 (49) 5 / 68 Do we see the same effect of altitude with and without spleen? 6 / 68 Interaction What is interaction? Interaction between two treatments (or factors) means that The effect of the two treatments depend on one another. When interaction is present: Quantify differences between treatment combinations as in a one-way ANOVA. Estimated effects of the one treatment must be presented for each value of the other treatment in turn (and vice versa). Interaction is also called effect modification Because the effect of one treatment is modified by the other. 7 / 68 8 / 68

3 Model with or without interaction Parameter estimates (FIX ME) Model: for k th rat with combination of i th and j th treatment. Y ijk = µ + α i + β j + γ ij + ε ijk µ: mean of reference group (no splenectomy, normal altitude). α: effect of splenectomy (at normal altitude) β: effect of altitude (without splenectomy) γ: possible interaction (i.e. increase/decrease in anticipated effect when the two treatments are combined). ε ijk s are the error terms assumed independent N (0, σ 2 ) In case γ = 0 we say that there is no interaction or that the treatment effects are additive. We can test this as a hypothesis. Model: With interaction Without interaction Effect Estimate (95% CI) Estimate (95% CI) Intercept (312.8;419.5) (316.5;408.3) Altitude 74.8 (-3.0;152.5) 82.7 (28.6;136.8) Splenectomy (-179.9;-29.0) (-151.0;-43.0) Interaction 15.8 (-94.2;125.8) assumed = 0! Hence the estimated effect of altitude is 15.8 higher (95% CI to 125.8) for a rat who has its spleen removed compared to one who has not. The interaction is not significant, but the confidence is wide so we cannot completely rule out a possible effect modification. 9 / / 68 Interpretation of parameter estimates. Expected fibrinogen levels for each treatment combination altitude splenectomy normal high no = = yes = = Here we have added the estimated treatment effects to the mean of the reference group. 11 / 68 Testing interaction in SAS PROC GLM DATA=fibrinogen PLOTS=(DIAGNOSTICS RESIDUALS); CLASS splenectomy (ref= no ) altitude (ref= normal ); MODEL fibrinogen=altitude splenectomy altitude*splenectomy / SOLUTION CLPARM; OUTPUT OUT=fit expected=predicted; 12 / 68 Use PROC GLM for two-way ANOVA Both treatment factors must be declared with CLASS. If reference groups are not chosen SAS uses the last in alphabetic order. Both the main effects and the interaction must be included in the MODEL-statement Options SOLUTION CLPARM prints parameter estimates and confidence intervals. Use the OUTPUT-statement to save fitted values in a dataset.

4 Output: test of any treatment effect Output: test for interaction The GLM Procedure Class Level Information Class Levels Values altitude 2 high norm splenectomy 2 yes no Number of Observations Read 34 Number of Observations Used 34 Dependent Variable: fibrinogen R-Square Coeff Var Root MSE fibrinogen Mean Source DF Type I SS Mean Square F Value Pr > F altitude splenectomy altitude*splenectomy Source DF Type III SS Mean Square F Value Pr > F Sum of Source DF Squares Mean Square F Value Pr > F Model Error Corrected Total altitude splenectomy altitude*splenectomy Type III tests: Drop one factor while keeping the others. Type I tests: (read buttom up) Drop one factor after the other. 13 / / 68 Output: parameter estimates Post hoc testing: Interaction Standard Parameter Estimate Error t Value Pr > t 95% Confidence Limits Intercept B < altitude high B altitude norm B..... splenectomy yes B splenectomy no B..... altitude*splenectomy high yes B altitude*splenectomy high no B..... altitude*splenectomy norm yes B..... altitude*splenectomy norm no B..... NOTE: The X X matrix has been found to be singular, and a generalized inverse was used to solve the normal equations. estimates are followed by the letter B are not uniquely estimable. The warning means that other parameter estiates could have been obtained if an others reference groups were chosen; not a problem! If interaction is present, compare all treatment combinations with: PROC GLM DATA=fibrinogen; CLASS splenectomy (ref= no ) altitude (ref= normal ); MODEL fibrinogen=altitude*splenectomy; LSMEANS altitude*splenectomy / PDIFF CL; Or assess the effect of each treatment given the other with: Terms whose PROC GLM DATA=fibrinogen; CLASS splenectomy (ref= no ) altitude (ref= normal ); MODEL fibrinogen=altitude*splenectomy; LSMEANS altitude*splenectomy / SLICE=altitude; LSMEANS altitude*splenectomy / SLICE=splenectomy; 15 / / 68

5 Post hoc testing: No interaction Model checking If there is no interaction, the treatment effects are additive. Hence, asses each treatment in turn with: PROC GLM DATA=fibrinogen; CLASS splenectomy (ref= no ) altitude (ref= normal ); MODEL fibrinogen=altitude splenectomy; LSMEANS altitude / PDIFF CL; LSMEANS splenectomy / PDIFF CL; or in this case just use / SOLUTION CL with the model statement since there are only two levels of each treatment factor. The error terms ε st s are assumed to be independent (this we know to be true). normally distributed with zero mean and equal variances Use the residuals for model checking: Probability or QQ-plot of residuals. Plot of residuals vs expected values and/or factors. Any outliers in the data? 17 / / 68 Expected values and residuals Diagnostic plots Expected value: for altitude=normal, splenectomy=yes: ŷ ij = ˆµ + ˆα i + ˆβ j + ˆγ ij = = Residual: for the first rat in this group: ε ijk r ijk = observed expected = y ijk ŷ ij ε st = = / / 68

6 Outline Overview: comparison of treatment groups Two-way ANOVA and interaction Mathed samples ANOVA Random vs systematic variation Mixed models Repeatability and reproducibility number independent paired of groups samples samples 2 unpaired paired t-test t-test 2 one-way two-way analysis of variance analysis of variance or mixed model Analysis of variance: Last week: t-tests and one-way ANOVA. Today: Two-way ANOVA and mixed models. 21 / / 68 Example + exercise: Gene expressions Spaghettigram Four treatments applied to five cell lines (from lecture 2). Treatment ctrl A B C Do we see: differences among treatments? differnces among cell lines? (Is this interesting?) Interaction? (Not possible to test and not interesting) The cell lines should be roughly parallel and equally variable Log-transformed seems better than raw data. 23 / / 68

7 Two-way ANOVA model Test of treatment effect Measurement for subject s with treatment t: Y st = µ + α s + β t + ε st µ is the intercept (mean of reference) α s describe expected differences between cell lines. β s describe expected differences between treatments. The error terms ε st s are assumed to be independent normally distributed with equal variances The model assumptions should be checked / 68 PROC GLM DATA=expression12; CLASS cell_line treatment; MODEL log_expression=cell_line treatment / SOLUTION CLPARM; Source DF Type III SS Mean Square F Value Pr > F cell_line treatment We find significant differences among treatments (interesting) and among cell lines (not that interesting... ). 26 / 68 Parameter estimates Estimates of treatment effect As compared to the control group: Standard Parameter Estimate Error t Value Pr > t 95% Confidence Limits Intercept B < cell_line B cell_line B cell_line B cell_line B cell_line B..... Treatment A B Treatment B B Treatment C B Treatment ctrl B..... NOTE: The X X matrix has been found to be singular, and a generalized inverse was used to solve the normal equations. estimates are followed by the letter B are not uniquely estimable. Note: The control treatment has been chosen as reference. Treatment A, B, and C parameter estimates are expected differences wrt the control... on log-scale!. Treatment log-scale back-transformed A 1.16 (0.58;1.74) +218% (+79%;+467%) B 0.17 (-0.41;0.75) +19% (-33%;+111%) C 0.13 (-0.45;0.70) +13% (-36%;+102%) i.e. treatment A approximately triples the gene expression level 100 {exp( ) 1} 100 ( ) 218. Terms whose Multiple comparisons: could be performed by e.g. adding the following statment to the program: LSMEANS treatment / PDIFF=CONTROL ADJUST=DUNNETT CLPARM; (here for all comparisons to the control). 27 / / 68

8 Outline Gene expressions again Two-way ANOVA and interaction Mathed samples ANOVA Random vs systematic variation Mixed models Repeatability and reproducibility Source DF Type III SS Mean Square F Value Pr > F cell_line Standard Parameter Estimate Error t Value Pr > t 95% Confidence Limits Intercept B < cell_line B cell_line B cell_line B cell_line B cell_line B..... NOTE: The X X matrix has been found to be singular, and a generalized inverse was used to solve the normal equati estimates are followed by the letter B are not uniquely estimable. Overall significant differences in gene expression levels were found among the cell lines (P=0.0212), and estimates show that e.g. cell lines 1, 2, and 3, but not 4, differ significantly from cell line 5. Should this be reported as an interesting finding? 29 / / 68 Fixed and random effects Example: experiment with rabbits Fixed effects such as treatment, dose, and time. Typically a limited number of carefully selected groups. Group names are specific and cannot be shuffled. Each group must have a decent size in order to reach interesting conclusions (statistical power). Random effect such as rat, cell line, experiment or operator. Possibly a large number of different groups. Group names are non-informative (number of rat or cell line) and could be shuffled without consequence. Allows inference to be extended beyond the subjects in the experiment and to the population they were sampled from. The number of groups matters not the size of the groups. R = 6 rabbits vaccinated. In S = 6 spots on the back. Response: swelling in cm 2 Model: Which one? A one-way ANOVA with a random effect; the rabbit-factor 31 / / 68

9 One-way ANOVA with random variation Comparison of k groups/clusters, satisfying: The groups are of no individual interest and it is of no relevance to test whether they have identical means. The groups may be thought of as a random sample from a population, that we want to describe. Example: Swelling was measured 6 times consecutively on a sample of 6 rabbits. 33 / 68 What response can we expect in the population? Test for identical rabbits means: P = (one-way ANOVA) is not very helpfull in this regard, and neither are the estimates of differences between specific rabbits. Mean swelling with 95% CL (and normal range) is better. Random effects ANOVA model Model for response of s th spot on r th rabbit: Y rs = µ + a r + ε rs µ is the grand mean (i.e. of the rabbit population). a r is the between-rabbit deviation (i.e. how does rabbit r deviate from the grand mean). ε rs is the within-rabbit deviation (i.e. how does spot s deviate from its rabbit s mean). It is assumed that all error terms (a r s and ε rs s) are independent and normally distributed: a r N (0, ω 2 B), ε rs N (0, σ 2 W ) The deviations between rabbits are considered random and their variance ωb 2, is called the between-rabbit variance component. 34 / 68 Implications of random effects anova Each single observations is sampled from the same population assumed to follow the normal distribution: Y rs N (µ, ω 2 B + σ 2 W ) Population mean µ (the grand mean). Population variance ω 2 B + σ2 W (the total variation). But: Measurements made on the same rabbit are correlated with the so-called intra-class correlation More about correlation next lecture Parameter estimates Grand mean (µ): 7.37 (6.68;8.05). Variance components: Variation Variance component Estimate (95% CI) %of variation Between ω 2 B 0.33 (0.03; 1.04) 36% Within ω 2 W 0.58 (0.06; 2.48) 64% Total ω 2 B + σ2 W % Corr(y r1, y r2 ) = ρ = ω 2 B ω 2 B + σ2 W Warning: Confidence intervals for the variance components may be invalid due to the tiny sample size (only six rabbits). I.e. measurements made on the same rabbit tend to look more alike than measurements made on different rabbits 35 / / 68

10 Interpretation of variance components Typical difference between spots on the same rabbit: y rs1 y rs2 = µ + α r + ε rs1 (µ + α r + ε rs2 ) = ε rs1 + ( ε rs2 ) N (0, 2 ω 2 W ) Normal region: ± = ± 2.16 cm 2 Typical difference between spots on different rabbits: y r1 s 1 y r2 s 2 = α r1 + ( α r2 ) + ε rs1 + ( ε rs2 ) N (0, 2 (σ 2 B + ω 2 W )) Normal region: ± 2 2 ( ) = ± 2.70 cm 2 Note: If Y 1 N (µ 1, σ 2 1) and Y 2 N (µ 2, σ 2 2) are independent normal variables, then their difference is normal Y 1 Y 2 N (µ 1 µ 2, σ σ 2 2). 37 / 68 SAS: PROC MIXED PROC MIXED DATA=rabbit; CLASS rabbit; MODEL swelling = / SOLUTION CL DDFM=SATTERTHWAITTE; RANDOM rabbit; 38 / 68 Syntax is similar to PROC GLM with a MODEL-statement specifying the relationship between outcome and covariates. Categorical variables must be declared with CLASS. Random effects are specified in a RANDOM-statement. The technical option DDFM=SATTERTHWAITTE ensures that correct degrees of freedom are used in computation e.g. when data is unbalanced. When in doubt, use it! SAS: proc mixed output SAS: proc mixed output Model Information Data Set Dependent Variable Covariance Structure Estimation Method Residual Variance Method Fixed Effects SE Method Degrees of Freedom Method Class Level Information Class Levels Values rabbit Dimensions Covariance Parameters 2 Columns in X 1 Columns in Z 6 Subjects 1 Max Obs Per Subject / 68 WORK.A2 swelling Variance Components REML Profile Model-Based Satterthwaitte Number of Observations Number of Observations Read 36 Number of Observations Used 36 Number of Observations Not Used 0 Iteration History Iteration Evaluations -2 Res Log Like Criterion Convergence criteria met. Always check that numerical optimisation has converged. 40 / 68

11 SAS: proc mixed output Negative variance components Covariance Parameter Estimates Cov Parm Estimate rabbit Residual Fit Statistics -2 Res Log Likelihood 91.5 AIC (smaller is better) 95.5 AICC (smaller is better) 95.9 BIC (smaller is better) 95.1 Solution for Fixed Effects Effect Estimate StdError DF t Value Pr > t Alpha Lower Upper Intercept < Finally: Parameter estimates, tests, and some overall goodness of fit 41 / 68 statistics (that could be used to compare to other models). Warning: It may happen that SAS reports a zero-estimate for the variation between, ω 2 B. By coincidence. Thus the model is OK. As a result of competition within clusters. 42 / 68 Example: yield of plants grown in the same pot. Thus, the model is wrong as the clustering leads to dissimilarities (negative correlation) rather than similarities (positive correlation) in outcome. Comparison of modeling strategies Comments on the strategies: Quantifying overall swelling Four strategies for estimating the grand mean of the rabbit population method estimate (s.e.) 1: forget rabbit (0.155) 2: fixed rabbit (0.127) 3: rabbit averages (0.267) 4: random rabbit (0.267) 1. We (wrongfully) assume independence all 36 measurements 2. We estimate the mean swelling by classical one-way anova. 3. We reduce the data to six averages from the individual rabbits and then compute mean and SE. 4. We estimate the mean swelling in the random effects anova model. 1. Ignoring the clustering is wrong! leads to systematic underestimation of the standard error. 2. In the fixed effect one-way anova the grand mean has a different interpretation!... as the mean swelling of these six particular rabbits. leads to systematic underestimation of the standard error. 3. Looking at the sample of averages may be OK. At least in balanced designs (otherwise the individual averages have unequal variances and the standard error may be affected) But we loose information on within subject variation. 43 / / 68

12 Unbalanced data We delete the 3 smallest measurements from rabbit 2 (largest level) so that the data becomes unbalanced and the results change: method estimate (s.e.) 1: forget rabbit (0.163) 2: fixed rabbit (0.136) 3: rabbit averages (0.333) 4: random rabbit (0.298) Full sample (0.267) 1 we have omitted some of the largest observations 2 rabbit 2 has a lower weight in the average (only 3 observations) 3 average for rabbit 2 has increased 4 rabbit 2 has a lower weight in the average due to a larger standard error Design considerations Plan an experiment with: R rabbits (independent or true replicates). S spots for each rabbit (repeated measurements or pseudo replicates). R S measurements. Then variance of mean estimate var(ȳ) = ω2 B R + σ2 W RS, decreases with R and S. standard error rabbits The different curves correspond to S varying from 1 to / / 68 Effective sample size Outline How many rabbits would we need to obtain the same precision in estimating the grand mean if we had only one measurement on each of R 1 rabbits? Solve the equation for var(ȳ): R 1 = R S 1 + ρ(s 1) where ρ is the within rabbit correlation. Two-way ANOVA and interaction Mathed samples ANOVA Random vs systematic variation Mixed models Estimate: ρ = ω2 B ω 2 B +σ2 W = = R 1 = 12.8 Repeatability and reproducibility I.e. one measurement on each of thirteen rabbits gives the same precision as six measurements on each of six rabbits! 47 / / 68

13 Linear mixed models Generalisations of ANOVA and GLM models involving both fixed effects (covariates) and several sources of random variation, the so-called variance components. Environmental variation. Between clinics, regions or countries. Biological variation. Between patients, animals, or cell lines. Within-individual variation. Between injection sites, tumors, slices. Variation due to uncontrollable circumstances. E.g. day to day, assay, observer. Measurement error. E.g. duplicates, triplicates. Multi-level models Mixed models are also called variance component models. Often we have a multi-level model with hierarchical ordering of the levels. We have variation (i.e. a variance component) on each level. And possibly fixed effects (covariates) on each level. individual context/cluster context/cluster level 1 level 2 level 3 spots rabbits slices tumors mice duplicates experiments operators Arrows indicate simplification or grouping. 49 / / 68 Merits of mixed models Drawbacks of mixed models We get a better understanding of the various sources of variation. Certain effects may be estimated more precisely (higher power), since some sources of variation are eliminated, e.g. by making comparisons within the same subject. This is analogous to the paired comparison situation. When planning subsequent investigations, the knowledge of the relative sizes of the variance components will (in principle) be of help in deciding the number of repetitions needed at each level. Independent (sometimes called true) replicates Repeated measurements (called pseudo replicates) Their statistical analysis is more difficult. When making inference (estimation and testing), it is important to take all sources of variation into account. Results may be biased if one or more sources of variation are disregarded! Only few statistical software can do the correct analyses. 51 / / 68

14 Testing fixed effects Testing fixed effects with PROC MIXED Imagine that rabbits are grouped in two (e.g. treatments): level variation covariates 1 within rabbit spot 2 between rabbits group Part of the variation between rabbits could be explained by systematic differences between groups. Part of the variation within rabbits could be explained by systematic differences between spots. PROC MIXED DATA=rabbit; CLASS grp rabbit spot; MODEL swelling = grp spot / SOLUTION CL DDFM=SATTERTH; RANDOM rabbit; Output: Covariance Parameter Estimates Cov Parm Estimate rabbit < smaller than before Residual < smaller than before 53 / / 68 Testing fixed effects with PROC MIXED Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F group spot Solution for Fixed Effects Effect spot group Estimate StdError DF t Value Pr > t Alpha Lower Upper Intercept group group spot a spot b Disregarding repeated measurements When the random rabbit variation is ignored: PROC GLM DATA=rabbit; CLASS group spot; MODEL swelling=group spot / SOLUTION CLPARM; Source DF Type III SS Mean Square F Value Pr > F group spot Standard Parameter Estimate Error t Value Pr > t 95% Confidence Limits Intercept B < group B group B..... spot a B spot b B / 68 Too small standard errors for estimates of difference between groups and too large standard errors for estimates of differences 56 / 68 between spots!

15 Summary Outline Measurements belonging together in the same cluster tend to look alike (they are correlated). If we fail to take thid into account, we will experience: Possible bias in estimates (in unbalanced data). Too small standard errors (type 1 error) for estimates of level 2 effects (between-cluster effects). Too low efficiency (type 2 error) for evaluation of level 1 covariates (within-cluster effects) Two-way ANOVA and interaction Mathed samples ANOVA Random vs systematic variation Mixed models Repeatability and reproducibility 57 / / 68 Comparing measurement devices Illustration of all data Example: Peak expiratory flow rate, l/min: 17 subjects, 2 measurement devices, two replicates with each method. subject Wright mini Wright id Y 1p1 Y 1p2 Y 2p1 Y 2p Average SD Reference: Bland and Altman, Lancet (1986). 59 / / 68

16 Aim of investigation Simple approaches Quantify the precision of each measuring device Repeatability (variability=measurement error) Quantify the agreement between the two devices. Bias of one method compared to the other. Variance of one method compared to the other. Can the devices be used interchangably? For reliability of each method separately we could: make Bland Altman plots of differences vs averages. compute limits of agreement, i.e. the 95% normal range of the differences. For reproducibility (method comparison) we might: compare the averages in a Bland-Altman plot? Not good - unless you also do averages in clinic! For both at the same time: Mixed model for variance between and within methods. 61 / / 68 Variance component models Stratified analyses For each method (i = 1, 2) we have a variance component model Y ijk = µ i + a ij + ε ijk µ i population mean as anticipated by method i. a ij deviation of subject j from population mean, assumed normally distributed N (0, σ 2 i ). ε ijk deviation for replicate k (measurement error), assumed normally distributed N (0, ω 2 i ). PROC MIXED DATA=wright; BY method; CLASS id; MODEL flow = / SOLUTION CL; RANDOM id; method=mini Cov Parm Subject Estimate Intercept id Residual Effect Estimate Error DF t Value Pr > t Alpha Lower Upper Intercept < method=wright Cov Parm Subject Estimate Intercept id Residual Effect Estimate Error DF t Value Pr > t Alpha Lower Upper Intercept < / / 68

17 Joint model for both methods For methods (i = 1, 2): Y ijk = µ i + a ij + ε ijk ε ijk assumed normally distributed N (0, ω 2 i ) and independent across methods. a ij assumed normally distributed N (0, σ 2 i ) and correlated with ρ = Cor(a i1, a i2 ). Anticipated means for the same subject ought to look a lot like each other, so the a ij s are likely to be correlated across methods. Note that SAS outputs the covariance parameter σ 12 = Cov(a 1j, a 2j ) = σ 1 σ 2 ρ. Advanced analysis From the statistical analysis of repeated measurements-course. PROC MIXED DATA=wright; CLASS method id; MODEL flow=method / SOLUTION CL; RANDOM method / TYPE=UN SUBJECT=id; REPEATED / TYPE=simple GROUP=method SUBJECT=id*method; Covariance Parameter Estimates Cov Parm Subject Group Estimate UN(1,1) id UN(2,1) id UN(2,2) id Residual method*id method mini Residual method*id method wright Solution for Fixed Effects Effect method Estimate StdError DF t Value Pr > t Alpha Lower Upper Intercept < method mini method wright / / 68 Repeatability Reproducibility Typical differences (approximate 95% normal range) between two measurement with the same method: Wright: ˆω 2 1 = ±2 2ω 2 1 ±43.3 Mini: ˆω 2 2 = ±2 2ω 2 2 ±56.3 Seemingly Wright is more precise, but is the difference significant? F = = 1.69 F(17, 17) P = 0.14 Don t form too firm a conclusion with too small data. No evidence of systematic differences between the two methods. Estimated bias +6.0 (-10.4;22.4) for mini vs wright. P=0.46. Typical differnces between the two methods: var(y 1jk Y 2jk ) = var(a 1j a 2j + ε 1jk ε 2jk ) = σ σ 2 2 2σ 12 + ω ω 2 2 = = Limits-of-agreement: 6.03 ± = ( 69.3, 81.3). 67 / / 68

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 2016 Two-way ANOVA and interaction Matched samples ANOVA Random vs systematic variation

More information

Variance component models

Variance component models Faculty of Health Sciences Variance component models Analysis of repeated measurements, NFA 2016 Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics, University of Copenhagen Topics for

More information

Varians- og regressionsanalyse

Varians- og regressionsanalyse Faculty of Health Sciences Varians- og regressionsanalyse Variance component models Lene Theil Skovgaard Department of Biostatistics Variance component models Definitions and motivation One-way anova with

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

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

Variance components and LMMs

Variance components and LMMs Faculty of Health Sciences Variance components and LMMs Analysis of repeated measurements, 4th December 2014 Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics, University of Copenhagen

More information

Variance components and LMMs

Variance components and LMMs Faculty of Health Sciences Topics for today Variance components and LMMs Analysis of repeated measurements, 4th December 04 Leftover from 8/: Rest of random regression example. New concepts for today:

More information

Linear mixed models. Faculty of Health Sciences. Analysis of repeated measurements, 10th March Julie Lyng Forman & Lene Theil Skovgaard

Linear mixed models. Faculty of Health Sciences. Analysis of repeated measurements, 10th March Julie Lyng Forman & Lene Theil Skovgaard Faculty of Health Sciences Linear mixed models Analysis of repeated measurements, 10th March 2015 Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics, University of Copenhagen 1 / 80 Program

More information

Analysis of variance and regression. December 4, 2007

Analysis of variance and regression. December 4, 2007 Analysis of variance and regression December 4, 2007 Variance component models Variance components One-way anova with random variation estimation interpretations Two-way anova with random variation Crossed

More information

Correlated data. Overview. Variance component models. Terminology for correlated measurements. Faculty of Health Sciences. Variance component models

Correlated data. Overview. Variance component models. Terminology for correlated measurements. Faculty of Health Sciences. Variance component models Faculty of Health Sciences Overview Correlated data Variance component models Lene Theil Skovgaard & Julie Lyng Forman November 29, 2016 One-way anova with random variation The rabbit example Hierarchical

More information

Linear mixed models. Program. What are repeated measurements? Outline. Faculty of Health Sciences. Analysis of repeated measurements, 10th March 2015

Linear mixed models. Program. What are repeated measurements? Outline. Faculty of Health Sciences. Analysis of repeated measurements, 10th March 2015 university of copenhagen d e pa rt m e n t o f b i o s tat i s t i c s university of copenhagen d e pa rt m e n t o f b i o s tat i s t i c s Program Faculty of Health Sciences Topics: Linear mixed models

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

Introduction to SAS proc mixed

Introduction to SAS proc mixed Faculty of Health Sciences Introduction to SAS proc mixed Analysis of repeated measurements, 2017 Julie Forman Department of Biostatistics, University of Copenhagen Outline Data in wide and long format

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

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

Introduction to SAS proc mixed

Introduction to SAS proc mixed Faculty of Health Sciences Introduction to SAS proc mixed Analysis of repeated measurements, 2017 Julie Forman Department of Biostatistics, University of Copenhagen 2 / 28 Preparing data for analysis The

More information

Faculty of Health Sciences. Correlated data. Variance component models. Lene Theil Skovgaard & Julie Lyng Forman.

Faculty of Health Sciences. Correlated data. Variance component models. Lene Theil Skovgaard & Julie Lyng Forman. Faculty of Health Sciences Correlated data Variance component models Lene Theil Skovgaard & Julie Lyng Forman November 27, 2018 1 / 84 Overview One-way anova with random variation The rabbit example Hierarchical

More information

Correlated data. Overview. Example: Swelling due to vaccine. Variance component models. Faculty of Health Sciences. Variance component models

Correlated data. Overview. Example: Swelling due to vaccine. Variance component models. Faculty of Health Sciences. Variance component models Faculty of Health Sciences Overview Correlated data Variance component models One-way anova with random variation The rabbit example Hierarchical models with several levels Random regression Lene Theil

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

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

Correlated data. Repeated measurements over time. Typical set-up for repeated measurements. Traditional presentation of data

Correlated data. Repeated measurements over time. Typical set-up for repeated measurements. Traditional presentation of data Faculty of Health Sciences Repeated measurements over time Correlated data NFA, May 22, 2014 Longitudinal measurements Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics University of

More information

ANOVA Longitudinal Models for the Practice Effects Data: via GLM

ANOVA Longitudinal Models for the Practice Effects Data: via GLM Psyc 943 Lecture 25 page 1 ANOVA Longitudinal Models for the Practice Effects Data: via GLM Model 1. Saturated Means Model for Session, E-only Variances Model (BP) Variances Model: NO correlation, EQUAL

More information

Faculty of Health Sciences. Correlated data. Variance component models. Lene Theil Skovgaard & Julie Lyng Forman.

Faculty of Health Sciences. Correlated data. Variance component models. Lene Theil Skovgaard & Julie Lyng Forman. Faculty of Health Sciences Correlated data Variance component models Lene Theil Skovgaard & Julie Lyng Forman November 28, 2017 1 / 96 Overview One-way anova with random variation The rabbit example Hierarchical

More information

Correlated data. Overview. Variance component models. Terminology for correlated measurements. Faculty of Health Sciences. Variance component models

Correlated data. Overview. Variance component models. Terminology for correlated measurements. Faculty of Health Sciences. Variance component models Faculty of Health Sciences Overview Correlated data Variance component models Lene Theil Skovgaard & Julie Lyng Forman November 28, 2017 One-way anova with random variation The rabbit example Hierarchical

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

Models for longitudinal data

Models for longitudinal data Faculty of Health Sciences Contents Models for longitudinal data Analysis of repeated measurements, NFA 016 Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics, University of Copenhagen

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

Analysis of variance and regression. May 13, 2008

Analysis of variance and regression. May 13, 2008 Analysis of variance and regression May 13, 2008 Repeated measurements over time Presentation of data Traditional ways of analysis Variance component model (the dogs revisited) Random regression Baseline

More information

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study 1.4 0.0-6 7 8 9 10 11 12 13 14 15 16 17 18 19 age Model 1: A simple broken stick model with knot at 14 fit with

More information

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS Duration - 3 hours Aids Allowed: Calculator LAST NAME: FIRST NAME: STUDENT NUMBER: There are 27 pages

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

Covariance Structure Approach to Within-Cases

Covariance Structure Approach to Within-Cases Covariance Structure Approach to Within-Cases Remember how the data file grapefruit1.data looks: Store sales1 sales2 sales3 1 62.1 61.3 60.8 2 58.2 57.9 55.1 3 51.6 49.2 46.2 4 53.7 51.5 48.3 5 61.4 58.7

More information

Correlated data. Overview. Cross-over study. Repetition. Faculty of Health Sciences. Variance component models, II. More on variance component models

Correlated data. Overview. Cross-over study. Repetition. Faculty of Health Sciences. Variance component models, II. More on variance component models Faculty of Health Sciences Overview Correlated data More on variance component models Variance component models, II Cross-over studies Non-normal data Comparing measurement devices Lene Theil Skovgaard

More information

Analysis of Longitudinal Data: Comparison Between PROC GLM and PROC MIXED. Maribeth Johnson Medical College of Georgia Augusta, GA

Analysis of Longitudinal Data: Comparison Between PROC GLM and PROC MIXED. Maribeth Johnson Medical College of Georgia Augusta, GA Analysis of Longitudinal Data: Comparison Between PROC GLM and PROC MIXED Maribeth Johnson Medical College of Georgia Augusta, GA Overview Introduction to longitudinal data Describe the data for examples

More information

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

Statistics for exp. medical researchers Comparison of groups, T-tests and ANOVA 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

More information

Correlated data. Longitudinal data. Typical set-up for repeated measurements. Examples from literature, I. Faculty of Health Sciences

Correlated data. Longitudinal data. Typical set-up for repeated measurements. Examples from literature, I. Faculty of Health Sciences Faculty of Health Sciences Longitudinal data Correlated data Longitudinal measurements Outline Designs Models for the mean Covariance patterns Lene Theil Skovgaard November 27, 2015 Random regression Baseline

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

MIXED MODELS FOR REPEATED (LONGITUDINAL) DATA PART 2 DAVID C. HOWELL 4/1/2010

MIXED MODELS FOR REPEATED (LONGITUDINAL) DATA PART 2 DAVID C. HOWELL 4/1/2010 MIXED MODELS FOR REPEATED (LONGITUDINAL) DATA PART 2 DAVID C. HOWELL 4/1/2010 Part 1 of this document can be found at http://www.uvm.edu/~dhowell/methods/supplements/mixed Models for Repeated Measures1.pdf

More information

SAS Syntax and Output for Data Manipulation:

SAS Syntax and Output for Data Manipulation: CLP 944 Example 5 page 1 Practice with Fixed and Random Effects of Time in Modeling Within-Person Change The models for this example come from Hoffman (2015) chapter 5. We will be examining the extent

More information

STAT 525 Fall Final exam. Tuesday December 14, 2010

STAT 525 Fall Final exam. Tuesday December 14, 2010 STAT 525 Fall 2010 Final exam Tuesday December 14, 2010 Time: 2 hours Name (please print): Show all your work and calculations. Partial credit will be given for work that is partially correct. Points will

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

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

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

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

Topic 25 - One-Way Random Effects Models. Outline. Random Effects vs Fixed Effects. Data for One-way Random Effects Model. One-way Random effects

Topic 25 - One-Way Random Effects Models. Outline. Random Effects vs Fixed Effects. Data for One-way Random Effects Model. One-way Random effects Topic 5 - One-Way Random Effects Models One-way Random effects Outline Model Variance component estimation - Fall 013 Confidence intervals Topic 5 Random Effects vs Fixed Effects Consider factor with numerous

More information

Random Intercept Models

Random Intercept Models Random Intercept Models Edps/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Spring 2019 Outline A very simple case of a random intercept

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

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

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

Lecture 4. Random Effects in Completely Randomized Design

Lecture 4. Random Effects in Completely Randomized Design Lecture 4. Random Effects in Completely Randomized Design Montgomery: 3.9, 13.1 and 13.7 1 Lecture 4 Page 1 Random Effects vs Fixed Effects Consider factor with numerous possible levels Want to draw inference

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

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

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

Linear regression and correlation

Linear regression and correlation Faculty of Health Sciences Linear regression and correlation Statistics for experimental medical researchers 2018 Julie Forman, Christian Pipper & Claus Ekstrøm Department of Biostatistics, University

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

Repeated Measures Data

Repeated Measures Data Repeated Measures Data Mixed Models Lecture Notes By Dr. Hanford page 1 Data where subjects are measured repeatedly over time - predetermined intervals (weekly) - uncontrolled variable intervals between

More information

SAS Syntax and Output for Data Manipulation: CLDP 944 Example 3a page 1

SAS Syntax and Output for Data Manipulation: CLDP 944 Example 3a page 1 CLDP 944 Example 3a page 1 From Between-Person to Within-Person Models for Longitudinal Data The models for this example come from Hoffman (2015) chapter 3 example 3a. We will be examining the extent to

More information

over Time line for the means). Specifically, & covariances) just a fixed variance instead. PROC MIXED: to 1000 is default) list models with TYPE=VC */

over Time line for the means). Specifically, & covariances) just a fixed variance instead. PROC MIXED: to 1000 is default) list models with TYPE=VC */ CLP 944 Example 4 page 1 Within-Personn Fluctuation in Symptom Severity over Time These data come from a study of weekly fluctuation in psoriasis severity. There was no intervention and no real reason

More information

Analysis of Longitudinal Data: Comparison between PROC GLM and PROC MIXED.

Analysis of Longitudinal Data: Comparison between PROC GLM and PROC MIXED. Analysis of Longitudinal Data: Comparison between PROC GLM and PROC MIXED. Maribeth Johnson, Medical College of Georgia, Augusta, GA ABSTRACT Longitudinal data refers to datasets with multiple measurements

More information

Models for binary data

Models for binary data Faculty of Health Sciences Models for binary data Analysis of repeated measurements 2015 Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics, University of Copenhagen 1 / 63 Program for

More information

Review of CLDP 944: Multilevel Models for Longitudinal Data

Review of CLDP 944: Multilevel Models for Longitudinal Data Review of CLDP 944: Multilevel Models for Longitudinal Data Topics: Review of general MLM concepts and terminology Model comparisons and significance testing Fixed and random effects of time Significance

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

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

Lecture 2. The Simple Linear Regression Model: Matrix Approach

Lecture 2. The Simple Linear Regression Model: Matrix Approach Lecture 2 The Simple Linear Regression Model: Matrix Approach Matrix algebra Matrix representation of simple linear regression model 1 Vectors and Matrices Where it is necessary to consider a distribution

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

Outline. Statistical inference for linear mixed models. One-way ANOVA in matrix-vector form

Outline. Statistical inference for linear mixed models. One-way ANOVA in matrix-vector form Outline Statistical inference for linear mixed models Rasmus Waagepetersen Department of Mathematics Aalborg University Denmark general form of linear mixed models examples of analyses using linear mixed

More information

COMPLETELY RANDOM DESIGN (CRD) -Design can be used when experimental units are essentially homogeneous.

COMPLETELY RANDOM DESIGN (CRD) -Design can be used when experimental units are essentially homogeneous. COMPLETELY RANDOM DESIGN (CRD) Description of the Design -Simplest design to use. -Design can be used when experimental units are essentially homogeneous. -Because of the homogeneity requirement, it may

More information

SAS Code for Data Manipulation: SPSS Code for Data Manipulation: STATA Code for Data Manipulation: Psyc 945 Example 1 page 1

SAS Code for Data Manipulation: SPSS Code for Data Manipulation: STATA Code for Data Manipulation: Psyc 945 Example 1 page 1 Psyc 945 Example page Example : Unconditional Models for Change in Number Match 3 Response Time (complete data, syntax, and output available for SAS, SPSS, and STATA electronically) These data come from

More information

Simple, Marginal, and Interaction Effects in General Linear Models: Part 1

Simple, Marginal, and Interaction Effects in General Linear Models: Part 1 Simple, Marginal, and Interaction Effects in General Linear Models: Part 1 PSYC 943 (930): Fundamentals of Multivariate Modeling Lecture 2: August 24, 2012 PSYC 943: Lecture 2 Today s Class Centering 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

Homework 3 - Solution

Homework 3 - Solution STAT 526 - Spring 2011 Homework 3 - Solution Olga Vitek Each part of the problems 5 points 1. KNNL 25.17 (Note: you can choose either the restricted or the unrestricted version of the model. Please state

More information

Two-Way Analysis of Variance - no interaction

Two-Way Analysis of Variance - no interaction 1 Two-Way Analysis of Variance - no interaction Example: Tests were conducted to assess the effects of two factors, engine type, and propellant type, on propellant burn rate in fired missiles. Three engine

More information

171:162 Design and Analysis of Biomedical Studies, Summer 2011 Exam #3, July 16th

171:162 Design and Analysis of Biomedical Studies, Summer 2011 Exam #3, July 16th Name 171:162 Design and Analysis of Biomedical Studies, Summer 2011 Exam #3, July 16th Use the selected SAS output to help you answer the questions. The SAS output is all at the back of the exam on pages

More information

VIII. ANCOVA. A. Introduction

VIII. ANCOVA. A. Introduction VIII. ANCOVA A. Introduction In most experiments and observational studies, additional information on each experimental unit is available, information besides the factors under direct control or of interest.

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

Outline Topic 21 - Two Factor ANOVA

Outline Topic 21 - Two Factor ANOVA Outline Topic 21 - Two Factor ANOVA Data Model Parameter Estimates - Fall 2013 Equal Sample Size One replicate per cell Unequal Sample size Topic 21 2 Overview Now have two factors (A and B) Suppose each

More information

Introduction to Within-Person Analysis and RM ANOVA

Introduction to Within-Person Analysis and RM ANOVA Introduction to Within-Person Analysis and RM ANOVA Today s Class: From between-person to within-person ANOVAs for longitudinal data Variance model comparisons using 2 LL CLP 944: Lecture 3 1 The Two Sides

More information

Simple Linear Regression

Simple Linear Regression Simple Linear Regression In simple linear regression we are concerned about the relationship between two variables, X and Y. There are two components to such a relationship. 1. The strength of the relationship.

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

SAS Code: Joint Models for Continuous and Discrete Longitudinal Data

SAS Code: Joint Models for Continuous and Discrete Longitudinal Data CHAPTER 14 SAS Code: Joint Models for Continuous and Discrete Longitudinal Data We show how models of a mixed type can be analyzed using standard statistical software. We mainly focus on the SAS procedures

More information

Lecture 10: Experiments with Random Effects

Lecture 10: Experiments with Random Effects Lecture 10: Experiments with Random Effects Montgomery, Chapter 13 1 Lecture 10 Page 1 Example 1 A textile company weaves a fabric on a large number of looms. It would like the looms to be homogeneous

More information

Introduction to Random Effects of Time and Model Estimation

Introduction to Random Effects of Time and Model Estimation Introduction to Random Effects of Time and Model Estimation Today s Class: The Big Picture Multilevel model notation Fixed vs. random effects of time Random intercept vs. random slope models How MLM =

More information

MULTIVARIATE ANALYSIS OF VARIANCE

MULTIVARIATE ANALYSIS OF VARIANCE MULTIVARIATE ANALYSIS OF VARIANCE RAJENDER PARSAD AND L.M. BHAR Indian Agricultural Statistics Research Institute Library Avenue, New Delhi - 0 0 lmb@iasri.res.in. Introduction In many agricultural experiments,

More information

Stat/F&W Ecol/Hort 572 Review Points Ané, Spring 2010

Stat/F&W Ecol/Hort 572 Review Points Ané, Spring 2010 1 Linear models Y = Xβ + ɛ with ɛ N (0, σ 2 e) or Y N (Xβ, σ 2 e) where the model matrix X contains the information on predictors and β includes all coefficients (intercept, slope(s) etc.). 1. Number of

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

Topic 32: Two-Way Mixed Effects Model

Topic 32: Two-Way Mixed Effects Model Topic 3: Two-Way Mixed Effects Model Outline Two-way mixed models Three-way mixed models Data for two-way design Y is the response variable Factor A with levels i = 1 to a Factor B with levels j = 1 to

More information

Example: Poisondata. 22s:152 Applied Linear Regression. Chapter 8: ANOVA

Example: Poisondata. 22s:152 Applied Linear Regression. Chapter 8: ANOVA s:5 Applied Linear Regression Chapter 8: ANOVA Two-way ANOVA Used to compare populations means when the populations are classified by two factors (or categorical variables) For example sex and occupation

More information

STAT 3A03 Applied Regression With SAS Fall 2017

STAT 3A03 Applied Regression With SAS Fall 2017 STAT 3A03 Applied Regression With SAS Fall 2017 Assignment 2 Solution Set Q. 1 I will add subscripts relating to the question part to the parameters and their estimates as well as the errors and residuals.

More information

ssh tap sas913, sas

ssh tap sas913, sas B. Kedem, STAT 430 SAS Examples SAS8 ===================== ssh xyz@glue.umd.edu, tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm Multiple Regression ====================== 0. Show

More information

More about linear mixed models

More about linear mixed models Faculty of Health Sciences Contents More about linear mixed models Analysis of repeated measurements, NFA 2016 Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics, University of Copenhagen

More information

STAT 350. Assignment 4

STAT 350. Assignment 4 STAT 350 Assignment 4 1. For the Mileage data in assignment 3 conduct a residual analysis and report your findings. I used the full model for this since my answers to assignment 3 suggested we needed the

More information

Acknowledgements. Outline. Marie Diener-West. ICTR Leadership / Team INTRODUCTION TO CLINICAL RESEARCH. Introduction to Linear Regression

Acknowledgements. Outline. Marie Diener-West. ICTR Leadership / Team INTRODUCTION TO CLINICAL RESEARCH. Introduction to Linear Regression INTRODUCTION TO CLINICAL RESEARCH Introduction to Linear Regression Karen Bandeen-Roche, Ph.D. July 17, 2012 Acknowledgements Marie Diener-West Rick Thompson ICTR Leadership / Team JHU Intro to Clinical

More information

Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models:

Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models: Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models: Marginal models: based on the consequences of dependence on estimating model parameters.

More information

Topic 29: Three-Way ANOVA

Topic 29: Three-Way ANOVA Topic 29: Three-Way ANOVA Outline Three-way ANOVA Data Model Inference Data for three-way ANOVA Y, the response variable Factor A with levels i = 1 to a Factor B with levels j = 1 to b Factor C with levels

More information

An Introduction to Multilevel Models. PSYC 943 (930): Fundamentals of Multivariate Modeling Lecture 25: December 7, 2012

An Introduction to Multilevel Models. PSYC 943 (930): Fundamentals of Multivariate Modeling Lecture 25: December 7, 2012 An Introduction to Multilevel Models PSYC 943 (930): Fundamentals of Multivariate Modeling Lecture 25: December 7, 2012 Today s Class Concepts in Longitudinal Modeling Between-Person vs. +Within-Person

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

Simple, Marginal, and Interaction Effects in General Linear Models

Simple, Marginal, and Interaction Effects in General Linear Models Simple, Marginal, and Interaction Effects in General Linear Models PRE 905: Multivariate Analysis Lecture 3 Today s Class Centering and Coding Predictors Interpreting Parameters in the Model for the Means

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