The linear mixed model: modeling hierarchical and longitudinal data

Size: px
Start display at page:

Download "The linear mixed model: modeling hierarchical and longitudinal data"

Transcription

1 The linear mixed model: modeling hierarchical and longitudinal data Analysis of Experimental Data AED The linear mixed model: modeling hierarchical and longitudinal data 1 of 44

2 Contents 1 Modeling Hierarchical Data Overview Example: the High School and Beyond data Further issues Modeling Longitudinal Data Example: Reaction times in a sleep deprivation study AED The linear mixed model: modeling hierarchical and longitudinal data 2 of 44

3 1 Modeling Hierarchical Data 1.1 Overview especially in education (think students in schools ), applications of mixed models to hierarchical data have become very popular when researchers in the social sciences talk about multilevel analysis, they typically mean the application of mixed models to hierarchical data typical for this type of data is the sharp distinction between levels : the student level, and the school level, where one level (student) is nested in the other (school) data often contains both student characteristics and school charateristics; in a multilevel analysis, both types of variables can be included in one analysis simultaneously AED The linear mixed model: modeling hierarchical and longitudinal data 3 of 44

4 1.2 Example: the High School and Beyond data the following example is borrowed from Raudenbusch and Bryk (2001, chapter 4). the data are from the 1982 High School and Beyond survey, and pertain to 7185 U.S. high-school students from 160 schools (70 catholic, 90 public) these are the variables in the dataset: school an ordered factor designating the school that the student attends. minrty a factor with 2 levels (not used) sx a factor with levels Male and Female (not used) ses a numeric vector of socio-economic scores mach a numeric vector of Mathematics achievement scores meanses a numeric vector of mean ses for the school sector a factor with levels Public and Catholic cses a numeric vector of centered ses values where the centering is with respect to the meanses for the school AED The linear mixed model: modeling hierarchical and longitudinal data 4 of 44

5 the aim of the analysis is to determine how students math achievement scores are related to their family socioeconomic status but this relationship may very well vary among schools if there is indeed variation among schools, can we find any school characteristics that explain this variation? the two school characteristics that we will use are: sector: public school or Catholic school meanses: the average SES of students in the school AED The linear mixed model: modeling hierarchical and longitudinal data 5 of 44

6 Exploring the data > library(mlmrev) > summary(hsb82) school minrty sx ses mach 2305 : 67 No :5211 Male :3390 Min. : Min. : : 66 Yes:1974 Female:3795 1st Qu.: st Qu.: : 65 Median : Median : : 64 Mean : Mean : : 64 3rd Qu.: rd Qu.: : 64 Max. : Max. : (Other):6795 meanses sector cses Min. : Public :3642 Min. :-3.651e+00 1st Qu.: Catholic:3543 1st Qu.:-4.479e-01 Median : Median : 1.600e-02 Mean : Mean :-9.144e-19 3rd Qu.: rd Qu.: 4.694e-01 Max. : Max. : 2.856e+00 > head(hsb82) school minrty sx ses mach meanses sector cses No Female Public No Female Public AED The linear mixed model: modeling hierarchical and longitudinal data 6 of 44

7 No Male Public No Male Public No Male Public No Male Public > tail(hsb82) school minrty sx ses mach meanses sector cses Yes Female Catholic No Female Catholic No Female Catholic No Female Catholic No Female Catholic No Female Catholic AED The linear mixed model: modeling hierarchical and longitudinal data 7 of 44

8 Exploring the data: math achievement versus ses for several schools > set.seed(1234) > library(lattice) > cat <- sample(unique(hsb82$school[hsb82$sector == "Catholic"]), + 18) > Cat.18 <- Hsb82[is.element(Hsb82$school, cat), ] > plot1 <- xyplot(mach ses school, data = Cat.18, main = "Catholic", + xlab = "student SES", ylab = "Math Achievement", layout = c(6, + 3), panel = function(x, y) { + panel.xyplot(x, y) + panel.lmline(x, y) + }) > pub <- sample(unique(hsb82$school[hsb82$sector == "Public"]), + 18) > Pub.18 <- Hsb82[is.element(Hsb82$school, pub), ] > plot2 <- xyplot(mach ses school, data = Pub.18, main = "Public", + xlab = "student SES", ylab = "Math Achievement", layout = c(6, + 3), panel = function(x, y) { + panel.xyplot(x, y) + panel.lmline(x, y) + }) AED The linear mixed model: modeling hierarchical and longitudinal data 8 of 44

9 Catholic student SES Math Achievement AED The linear mixed model: modeling hierarchical and longitudinal data 9 of 44

10 Public student SES Math Achievement AED The linear mixed model: modeling hierarchical and longitudinal data 10 of 44

11 Fitting a simple regression model for each school separately > cat.list <- lmlist(mach ses school, subset = sector == "Catholic", + data = Hsb82) > head(coef(cat.list)) (Intercept) ses > pub.list <- lmlist(mach ses school, subset = sector == "Public", + data = Hsb82) > head(coef(pub.list)) (Intercept) ses AED The linear mixed model: modeling hierarchical and longitudinal data 11 of 44

12 Catholic (Intercept) ses AED The linear mixed model: modeling hierarchical and longitudinal data 12 of 44

13 Public (Intercept) ses AED The linear mixed model: modeling hierarchical and longitudinal data 13 of 44

14 Intercepts Slopes Catholic Public Catholic Public AED The linear mixed model: modeling hierarchical and longitudinal data 14 of 44

15 Relationship intercepts and slopes and mean school SES Mean SES School Intercept Mean SES School Slope AED The linear mixed model: modeling hierarchical and longitudinal data 15 of 44

16 Model 1: a random-effects one-way ANOVA this is often called the empty model, since it containts no predictors, but simply reflects the nested structure no level-1 predictors, no level-2 predictors in the multilevel notation we specify a model for each level model for the first (student) level: y ij = α 0i + ɛ ij model for the second (school) level: α 0i = γ 00 + u 0i the combined model and the Laird-Ware form: y ij = γ 00 + u 0i + ɛ ij = β 0 + b 0i + ɛ ij AED The linear mixed model: modeling hierarchical and longitudinal data 16 of 44

17 this is an example of a random-effects one-way ANOVA model with one fixed effect (the intercept, β 0 ) representing the general population mean of math achievement, and two random effects: b 0i representing the deviation of math achievement in school i from the general mean ɛ ij representing the deviation of individual j s math achievement in school i from the school mean there are two variance components for this model: Var(b 0i ) = d 2 : the variance among school means Var(ɛ ij ) = σ 2 : the variance among individuals in the same school since b 0i and ɛ ij are assumed to be independent, the variation in math scores among individuals can be decomposed into these two variance components: Var(y ij ) = d 2 + σ 2 AED The linear mixed model: modeling hierarchical and longitudinal data 17 of 44

18 R code > fit.model1 <- lmer(mach 1 + (1 school), data = Hsb82) > summary(fit.model1) Linear mixed model fit by REML Formula: mach 1 + (1 school) Data: Hsb82 AIC BIC loglik deviance REMLdev Random effects: Groups Name Variance Std.Dev. school (Intercept) Residual Number of obs: 7185, groups: school, 160 Fixed effects: Estimate Std. Error t value (Intercept) AED The linear mixed model: modeling hierarchical and longitudinal data 18 of 44

19 Intra-class correlation the intra-class correlation coefficient is the proportion of variation in individuals scores due to differences among schools: d 2 Var(y ij ) = d2 d 2 + σ 2 = ρ ρ may also be interpreted as the correlation between the math scores of two individuals from the same school: Cor(y ij, y ij ) = > s <- summary(fit.model1) > d2 <- as.numeric(s@remat[, 3])[1] > s2 <- as.numeric(s@remat[, 3])[2] > rho <- d2/(d2 + s2) > rho [1] Cov(y ij, y ij ) Var(yij ) Var(y ij ) = d2 d 2 + σ 2 = ρ AED The linear mixed model: modeling hierarchical and longitudinal data 19 of 44

20 about 18 percent of the variation in students match-achievement scores is attributable to differences among schools this is often called the cluster effect AED The linear mixed model: modeling hierarchical and longitudinal data 20 of 44

21 Model 2: a random-effects one-way ANCOVA 1 level-1 predictor (SES, centered within school), no level-2 predictors random intercept, no random slopes model for the first (student) level: y ij = α 0i + α 1i cses ij + ɛ ij model for the second (school) level: α 0i = γ 00 + u 0i α 1i = γ 10 (the random intercept) (the constant slope) the combined model and the Laird-Ware form: y ij = (γ 00 + u 0i ) + γ 10 cses ij + ɛ ij = γ 00 + γ 10 cses ij + u 0i + ɛ ij = β 0 + β 1 x 1ij + b 0i + ɛ ij AED The linear mixed model: modeling hierarchical and longitudinal data 21 of 44

22 the fixed-effect coefficients β 0 and β 1 represent the average within-schools population intercept and slope respectively note: because SES is centered within schools, the intercept β 0 represents the average level of math achievement in the population the model has two variance-covariance components: Var(b 0i ) = d 2 : the variance among school intercepts Var(ɛ ij ) = σ 2 : the error variance around the within-school regressions AED The linear mixed model: modeling hierarchical and longitudinal data 22 of 44

23 R code > fit.model2 <- lmer(mach 1 + cses + (1 school), data = Hsb82) > summary(fit.model2) Linear mixed model fit by REML Formula: mach 1 + cses + (1 school) Data: Hsb82 AIC BIC loglik deviance REMLdev Random effects: Groups Name Variance Std.Dev. school (Intercept) Residual Number of obs: 7185, groups: school, 160 Fixed effects: Estimate Std. Error t value (Intercept) cses Correlation of Fixed Effects: (Intr) cses AED The linear mixed model: modeling hierarchical and longitudinal data 23 of 44

24 Model 3: a random-coefficients regression model 1 level-1 predictor (SES, centered within school), no level-2 predictors random intercept and random slopes model for the first (student) level: y ij = α 0i + α 1i cses ij + ɛ ij model for the second (school) level: α 0i = γ 00 + u 0i α 1i = γ 10 + u 1i (the random intercept) (the random slope) the combined model and the Laird-Ware form: y ij = (γ 00 + u 0i ) + (γ 10 + u 1i ) cses ij + ɛ ij = γ 00 + γ 10 cses ij + u 0i + u 1i cses ij + ɛ ij = β 0 + β 1 x 1ij + b 0i + b 0i z 1ij + ɛ ij AED The linear mixed model: modeling hierarchical and longitudinal data 24 of 44

25 the fixed-effect coefficients β 0 and β 1 again represent the average withinschools population intercept and slope respectively the model has four variance-covariance components: Var(b 0i ) = d 2 0: the variance among school intercepts Var(b 1i ) = d 2 1: the variance among school slopes Cov(b 0i, b 1i ) = d 01 : the covariance between within-school intercepts and slopes Var(ɛ ij ) = σ 2 : the error variance around the within-school regressions AED The linear mixed model: modeling hierarchical and longitudinal data 25 of 44

26 R code > fit.model3 <- lmer(mach 1 + cses + (1 + cses school), data = Hsb82) > summary(fit.model3) Linear mixed model fit by REML Formula: mach 1 + cses + (1 + cses school) Data: Hsb82 AIC BIC loglik deviance REMLdev Random effects: Groups Name Variance Std.Dev. Corr school (Intercept) cses Residual Number of obs: 7185, groups: school, 160 Fixed effects: Estimate Std. Error t value (Intercept) cses Correlation of Fixed Effects: (Intr) cses AED The linear mixed model: modeling hierarchical and longitudinal data 26 of 44

27 Is the random slope necessary? R code > anova(fit.model2, fit.model3) Data: Hsb82 Models: fit.model2: mach 1 + cses + (1 school) fit.model3: mach 1 + cses + (1 + cses school) Df AIC BIC loglik Chisq Chi Df Pr(>Chisq) fit.model fit.model ** --- Signif. codes: 0 *** ** 0.01 * note: you can only compare two models using likelihood-ratio tests if the two models have the same fixed effects! AED The linear mixed model: modeling hierarchical and longitudinal data 27 of 44

28 Model 4: random intercept + level-2 predictor we drop the level-1 predictor (cses), but add a level-2 predictor (meanses) random intercept, no random slopes model for the first (student) level: model for the second (school) level: y ij = α 0i + ɛ ij α 0i = γ 00 + γ 01 meanses i + u 0i the combined model and the Laird-Ware form: y ij = γ 00 + γ 01 meanses i + u 0i + ɛ ij = β 0 + β 1 x 1ij + b 0i + ɛ ij note that in the Laird-Ware notation, we use a double index for the fixedeffects x ij, even if the variabele (meanses) does not change over students AED The linear mixed model: modeling hierarchical and longitudinal data 28 of 44

29 this model has two fixed effects (β 0 and β 1 ) and two random effects (b 0i and ɛ ij ) the interpretation of b 0i has changed: whereas in the previous model it had been the deviation of school i s mean from the grand mean, it now represents the residual (α 0i γ 00 γ 10 meanses j ); correspondingly, the variance component d 2 is now a conditional variance (conditional on the school mean SES) in Raudenbush and Bryk, this is called a Regression with means-as-outcomes model, because the school s mean (α 0i ) is predicted by the means SES of the school note in the following output that the residual variance between schools (2.64) is substantially smaller than the original (8.61) AED The linear mixed model: modeling hierarchical and longitudinal data 29 of 44

30 R code > fit <- lmer(mach 1 + meanses + (1 school), data = Hsb82) > summary(fit) Linear mixed model fit by REML Formula: mach 1 + meanses + (1 school) Data: Hsb82 AIC BIC loglik deviance REMLdev Random effects: Groups Name Variance Std.Dev. school (Intercept) Residual Number of obs: 7185, groups: school, 160 Fixed effects: Estimate Std. Error t value (Intercept) meanses Correlation of Fixed Effects: (Intr) meanses AED The linear mixed model: modeling hierarchical and longitudinal data 30 of 44

31 Model 5: random intercept + level-1 predictor + level-2 predictor one level-1 predictor (cses), and a level-2 predictor (meanses) random intercept, nonrandomly varying slopes model for the first (student) level: y ij = α 0i + α 1i cses ij + ɛ ij model for the second (school) level: α 0i = γ 00 + γ 01 meanses i + u 0i α 1i = γ 10 + γ 11 meanses i the combined model and the Laird-Ware form: y ij = (γ 00 + γ 01 meanses i + u 0i ) + (γ 10 + γ 11 meanses i ) cses ij + ɛ ij = γ 00 + γ 01 meanses i + γ 10 cses ij + γ 11 meanses i cses ij + u 0i + ɛ ij = β 0 + β 1 x 1ij + β 2 x 2ij + β 3 (x 1ij x 2ij ) + b 0i + ɛ ij AED The linear mixed model: modeling hierarchical and longitudinal data 31 of 44

32 this model illustrates that in a mixed model, we combine predictors from both levels to construct an interaction term no random slopes are used in this model; the idea is that once we control for the level-2 predictor (meanses), little or no variance in the slopes remains to be explained; the slopes vary across schools, but as a strict function of meanses this results in a random-intercept only model AED The linear mixed model: modeling hierarchical and longitudinal data 32 of 44

33 R code > fit <- lmer(mach 1 + meanses * cses + (1 school), data = Hsb82) > summary(fit) Linear mixed model fit by REML Formula: mach 1 + meanses * cses + (1 school) Data: Hsb82 AIC BIC loglik deviance REMLdev Random effects: Groups Name Variance Std.Dev. school (Intercept) Residual Number of obs: 7185, groups: school, 160 Fixed effects: Estimate Std. Error t value (Intercept) meanses cses meanses:cses Correlation of Fixed Effects: (Intr) meanss cses meanses cses meanses:css AED The linear mixed model: modeling hierarchical and longitudinal data 33 of 44

34 Model 6: intercepts-and-slopes-as-outcomes model we expand the model by including two level-2 predictors: meanses and sector; the slopes are again allowed to vary randomly model for the first (student) level: y ij = α 0i + α 1i cses ij + ɛ ij model for the second (school) level: α 0i = γ 00 + γ 01 meanses i + γ 02 sector i + u 0i α 1i = γ 10 + γ 11 meanses i + γ 12 sector i + u 1i AED The linear mixed model: modeling hierarchical and longitudinal data 34 of 44

35 the combined model and the Laird-Ware form: y ij = (γ 00 + γ 01 meanses i + γ 02 sector i + u 0i )+ (γ 10 + γ 11 meanses i + γ 12 sector i + u 1i ) cses ij + ɛ ij = γ 00 + γ 01 meanses i + γ 02 sector i + γ 10 cses ij + γ 11 meanses i cses ij + γ 12 sector i cses ij + u 0i + u 1i cses ij + ɛ ij = β 0 + β 1 x 1ij + β 2 x 2ij + β 3 x 3ij + β 4 (x 1ij x 3ij ) + β 5 (x 2ij x 3ij )+ b 0i + b 1i z 1ij + ɛ ij AED The linear mixed model: modeling hierarchical and longitudinal data 35 of 44

36 R code > fit.model6 <- lmer(mach 1 + meanses * cses + sector * cses + + (1 + cses school), data = Hsb82) > summary(fit.model6) Linear mixed model fit by REML Formula: mach 1 + meanses * cses + sector * cses + (1 + cses school) Data: Hsb82 AIC BIC loglik deviance REMLdev Random effects: Groups Name Variance Std.Dev. Corr school (Intercept) cses Residual Number of obs: 7185, groups: school, 160 Fixed effects: Estimate Std. Error t value (Intercept) meanses cses sectorcatholic meanses:cses cses:sectorcatholic Correlation of Fixed Effects: AED The linear mixed model: modeling hierarchical and longitudinal data 36 of 44

37 (Intr) meanss cses sctrct mnss:c meanses cses sectorcthlc meanses:css css:sctrcth Do we need the random slopes? > fit.model6bis <- lmer(mach 1 + meanses * cses + sector * cses + + (1 school), data = Hsb82) > anova(fit.model6bis, fit.model6) Data: Hsb82 Models: fit.model6bis: mach 1 + meanses * cses + sector * cses + (1 school) fit.model6: mach 1 + meanses * cses + sector * cses + (1 + cses school) Df AIC BIC loglik Chisq Chi Df Pr(>Chisq) fit.model6bis fit.model no: apparently, the level-2 predictors do a sufficiently good job of accounting for differences in slopes that the variance component for slopes is no longer needed AED The linear mixed model: modeling hierarchical and longitudinal data 37 of 44

38 1.3 Further issues modern software (for example lmer in R) can also handle partially nested data structures (for example, some students belong to several schools) you should always center level-1 covariates the standard hierarchical model can be extended to include heterogeneous level-1 variance terms in this case: each individual/cluster has a different variance for example: math achievement is more variable among boys than girls heterogeneity of the level-1 variance may be modelled as a function of predictors at both levels in practice, the log of the variance is modelled (to ensure positivity) the presence of heterogeneity of variance at level-1 is often due to misspecification of the level-1 model AED The linear mixed model: modeling hierarchical and longitudinal data 38 of 44

39 2 Modeling Longitudinal Data longitudinal data is very similar to hierarchical data: you typically have two levels: the timepoints (level-1) and the individuals/units (level-2) the focus of the analysis is often to find an appropriate polynomial (linear, quadratic, cubic,... ) that describes the evolution or growth curve of the data over time the components of that polynomial (intercept, slope, quadratic component,... ) may be constant (fixed) or varying (random) across individuals/units a complication in longitudinal data is that it may not be longer reasonable to assume that the level-1 errors ɛ ij are independent, since observations taken close in time on the same individual/units may well be more similar than observations farther apart in time; this is called auto-correlation in the world of linear mixed models, there is a delicate trade-off between adding more random effects to the model (implying more complicated patterns in the covariance matrix) or using a more complicated form for Σ i AED The linear mixed model: modeling hierarchical and longitudinal data 39 of 44

40 2.1 Example: Reaction times in a sleep deprivation study Dependent variable: the average reaction time per day (Reaction) for subjects in a sleep deprivation study. On day 0 the subjects had their normal amount of sleep. Starting that night they were restricted to 3 hours of sleep per night. The observations represent the average reaction time on a series of tests given each day to each subject. Days Number of days of sleep deprivation Subject Subject number on which the observation was made dataset is available in the lme4 package AED The linear mixed model: modeling hierarchical and longitudinal data 40 of 44

41 Exploring the data: the spaghetti plot 450 Average reaction time (ms) Days of sleep deprivation AED The linear mixed model: modeling hierarchical and longitudinal data 41 of 44

42 Exploring the data: linear regression for each subject Average reaction time (ms) Days of sleep deprivation AED The linear mixed model: modeling hierarchical and longitudinal data 42 of 44

43 A simple linear growth model > fit.linear <- lmer(reaction Days + (Days Subject), data = sleepstudy) > summary(fit.linear) Linear mixed model fit by REML Formula: Reaction Days + (Days Subject) Data: sleepstudy AIC BIC loglik deviance REMLdev Random effects: Groups Name Variance Std.Dev. Corr Subject (Intercept) Days Residual Number of obs: 180, groups: Subject, 18 Fixed effects: Estimate Std. Error t value (Intercept) Days Correlation of Fixed Effects: (Intr) Days > fit.quad <- lmer(reaction Days + I(Daysˆ2) + (Days Subject), AED The linear mixed model: modeling hierarchical and longitudinal data 43 of 44

44 + data = sleepstudy) > summary(fit.quad) Linear mixed model fit by REML Formula: Reaction Days + I(Daysˆ2) + (Days Subject) Data: sleepstudy AIC BIC loglik deviance REMLdev Random effects: Groups Name Variance Std.Dev. Corr Subject (Intercept) Days Residual Number of obs: 180, groups: Subject, 18 Fixed effects: Estimate Std. Error t value (Intercept) Days I(Daysˆ2) Correlation of Fixed Effects: (Intr) Days Days I(Daysˆ2) AED The linear mixed model: modeling hierarchical and longitudinal data 44 of 44

Performing Cluster Bootstrapped Regressions in R

Performing Cluster Bootstrapped Regressions in R Performing Cluster Bootstrapped Regressions in R Francis L. Huang / October 6, 2016 Supplementary material for: Using Cluster Bootstrapping to Analyze Nested Data with a Few Clusters in Educational and

More information

Organizing data in R. Fitting Mixed-Effects Models Using the lme4 Package in R. R packages. Accessing documentation. The Dyestuff data set

Organizing data in R. Fitting Mixed-Effects Models Using the lme4 Package in R. R packages. Accessing documentation. The Dyestuff data set Fitting Mixed-Effects Models Using the lme4 Package in R Deepayan Sarkar Fred Hutchinson Cancer Research Center 18 September 2008 Organizing data in R Standard rectangular data sets (columns are variables,

More information

A short explanation of Linear Mixed Models (LMM)

A short explanation of Linear Mixed Models (LMM) A short explanation of Linear Mixed Models (LMM) DO NOT TRUST M ENGLISH! This PDF is downloadable at "My learning page" of http://www.lowtem.hokudai.ac.jp/plantecol/akihiro/sumida-index.html ver 20121121e

More information

Introduction to Mixed-Effects Models for Hierarchical and Longitudinal Data

Introduction to Mixed-Effects Models for Hierarchical and Longitudinal Data John Fox Lecture Notes Introduction to Mixed-Effects Models for Hierarchical and Longitudinal Data Copyright 2014 by John Fox Introduction to Mixed-Effects Models for Hierarchical and Longitudinal Data

More information

Practical 4: Mixed effect models

Practical 4: Mixed effect models Practical 4: Mixed effect models This practical is about how to fit (generalised) linear mixed effects models using the lme4 package. You may need to install it first (using either the install.packages

More information

Random coefficients models

Random coefficients models enote 9 1 enote 9 Random coefficients models enote 9 INDHOLD 2 Indhold 9 Random coefficients models 1 9.1 Introduction.................................... 2 9.2 Example: Constructed data...........................

More information

Introduction to Hierarchical Linear Model. Hsueh-Sheng Wu CFDR Workshop Series January 30, 2017

Introduction to Hierarchical Linear Model. Hsueh-Sheng Wu CFDR Workshop Series January 30, 2017 Introduction to Hierarchical Linear Model Hsueh-Sheng Wu CFDR Workshop Series January 30, 2017 1 Outline What is Hierarchical Linear Model? Why do nested data create analytic problems? Graphic presentation

More information

Introduction to Mixed Models: Multivariate Regression

Introduction to Mixed Models: Multivariate Regression Introduction to Mixed Models: Multivariate Regression EPSY 905: Multivariate Analysis Spring 2016 Lecture #9 March 30, 2016 EPSY 905: Multivariate Regression via Path Analysis Today s Lecture Multivariate

More information

Random coefficients models

Random coefficients models enote 9 1 enote 9 Random coefficients models enote 9 INDHOLD 2 Indhold 9 Random coefficients models 1 9.1 Introduction.................................... 2 9.2 Example: Constructed data...........................

More information

9.1 Random coefficients models Constructed data Consumer preference mapping of carrots... 10

9.1 Random coefficients models Constructed data Consumer preference mapping of carrots... 10 St@tmaster 02429/MIXED LINEAR MODELS PREPARED BY THE STATISTICS GROUPS AT IMM, DTU AND KU-LIFE Module 9: R 9.1 Random coefficients models...................... 1 9.1.1 Constructed data........................

More information

lme for SAS PROC MIXED Users

lme for SAS PROC MIXED Users lme for SAS PROC MIXED Users Douglas M. Bates Department of Statistics University of Wisconsin Madison José C. Pinheiro Bell Laboratories Lucent Technologies 1 Introduction The lme function from the nlme

More information

Mixed Effects Models. Biljana Jonoska Stojkova Applied Statistics and Data Science Group (ASDa) Department of Statistics, UBC.

Mixed Effects Models. Biljana Jonoska Stojkova Applied Statistics and Data Science Group (ASDa) Department of Statistics, UBC. Mixed Effects Models Biljana Jonoska Stojkova Applied Statistics and Data Science Group (ASDa) Department of Statistics, UBC March 6, 2018 Resources for statistical assistance Department of Statistics

More information

Introduction to mixed-effects regression for (psycho)linguists

Introduction to mixed-effects regression for (psycho)linguists Introduction to mixed-effects regression for (psycho)linguists Martijn Wieling Department of Humanities Computing, University of Groningen Groningen, April 21, 2015 1 Martijn Wieling Introduction to mixed-effects

More information

PSY 9556B (Feb 5) Latent Growth Modeling

PSY 9556B (Feb 5) Latent Growth Modeling PSY 9556B (Feb 5) Latent Growth Modeling Fixed and random word confusion Simplest LGM knowing how to calculate dfs How many time points needed? Power, sample size Nonlinear growth quadratic Nonlinear growth

More information

Section 2.2: Covariance, Correlation, and Least Squares

Section 2.2: Covariance, Correlation, and Least Squares Section 2.2: Covariance, Correlation, and Least Squares Jared S. Murray The University of Texas at Austin McCombs School of Business Suggested reading: OpenIntro Statistics, Chapter 7.1, 7.2 1 A Deeper

More information

Section 2.1: Intro to Simple Linear Regression & Least Squares

Section 2.1: Intro to Simple Linear Regression & Least Squares Section 2.1: Intro to Simple Linear Regression & Least Squares Jared S. Murray The University of Texas at Austin McCombs School of Business Suggested reading: OpenIntro Statistics, Chapter 7.1, 7.2 1 Regression:

More information

Course Business. types of designs. " Week 4. circle back to if we have time later. ! Two new datasets for class today:

Course Business. types of designs.  Week 4. circle back to if we have time later. ! Two new datasets for class today: Course Business! Two new datasets for class today:! CourseWeb: Course Documents " Sample Data " Week 4! Still need help with lmertest?! Other fixed effect questions?! Effect size in lecture slides on CourseWeb.

More information

Week 4: Simple Linear Regression III

Week 4: Simple Linear Regression III Week 4: Simple Linear Regression III Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Goodness of

More information

Regression Analysis and Linear Regression Models

Regression Analysis and Linear Regression Models Regression Analysis and Linear Regression Models University of Trento - FBK 2 March, 2015 (UNITN-FBK) Regression Analysis and Linear Regression Models 2 March, 2015 1 / 33 Relationship between numerical

More information

lme4: Mixed-effects modeling with R

lme4: Mixed-effects modeling with R Douglas M. Bates lme4: Mixed-effects modeling with R February 17, 2010 Springer Page: 1 job: lmmwr macro: svmono.cls date/time: 17-Feb-2010/14:23 Page: 2 job: lmmwr macro: svmono.cls date/time: 17-Feb-2010/14:23

More information

Hierarchical Generalized Linear Models

Hierarchical Generalized Linear Models Generalized Multilevel Linear Models Introduction to Multilevel Models Workshop University of Georgia: Institute for Interdisciplinary Research in Education and Human Development 07 Generalized Multilevel

More information

CDAA No. 4 - Part Two - Multiple Regression - Initial Data Screening

CDAA No. 4 - Part Two - Multiple Regression - Initial Data Screening CDAA No. 4 - Part Two - Multiple Regression - Initial Data Screening Variables Entered/Removed b Variables Entered GPA in other high school, test, Math test, GPA, High school math GPA a Variables Removed

More information

MIXED_RELIABILITY: A SAS Macro for Estimating Lambda and Assessing the Trustworthiness of Random Effects in Multilevel Models

MIXED_RELIABILITY: A SAS Macro for Estimating Lambda and Assessing the Trustworthiness of Random Effects in Multilevel Models SESUG 2015 Paper SD189 MIXED_RELIABILITY: A SAS Macro for Estimating Lambda and Assessing the Trustworthiness of Random Effects in Multilevel Models Jason A. Schoeneberger ICF International Bethany A.

More information

Section 3.4: Diagnostics and Transformations. Jared S. Murray The University of Texas at Austin McCombs School of Business

Section 3.4: Diagnostics and Transformations. Jared S. Murray The University of Texas at Austin McCombs School of Business Section 3.4: Diagnostics and Transformations Jared S. Murray The University of Texas at Austin McCombs School of Business 1 Regression Model Assumptions Y i = β 0 + β 1 X i + ɛ Recall the key assumptions

More information

Unit 5 Logistic Regression Practice Problems

Unit 5 Logistic Regression Practice Problems Unit 5 Logistic Regression Practice Problems SOLUTIONS R Users Source: Afifi A., Clark VA and May S. Computer Aided Multivariate Analysis, Fourth Edition. Boca Raton: Chapman and Hall, 2004. Exercises

More information

Using HLM for Presenting Meta Analysis Results. R, C, Gardner Department of Psychology

Using HLM for Presenting Meta Analysis Results. R, C, Gardner Department of Psychology Data_Analysis.calm: dacmeta Using HLM for Presenting Meta Analysis Results R, C, Gardner Department of Psychology The primary purpose of meta analysis is to summarize the effect size results from a number

More information

Resources for statistical assistance. Quantitative covariates and regression analysis. Methods for predicting continuous outcomes.

Resources for statistical assistance. Quantitative covariates and regression analysis. Methods for predicting continuous outcomes. Resources for statistical assistance Quantitative covariates and regression analysis Carolyn Taylor Applied Statistics and Data Science Group (ASDa) Department of Statistics, UBC January 24, 2017 Department

More information

Nonparametric Mixed-Effects Models for Longitudinal Data

Nonparametric Mixed-Effects Models for Longitudinal Data Nonparametric Mixed-Effects Models for Longitudinal Data Zhang Jin-Ting Dept of Stat & Appl Prob National University of Sinagpore University of Seoul, South Korea, 7 p.1/26 OUTLINE The Motivating Data

More information

Robust Linear Regression (Passing- Bablok Median-Slope)

Robust Linear Regression (Passing- Bablok Median-Slope) Chapter 314 Robust Linear Regression (Passing- Bablok Median-Slope) Introduction This procedure performs robust linear regression estimation using the Passing-Bablok (1988) median-slope algorithm. Their

More information

Output from redwing2.r

Output from redwing2.r Output from redwing2.r # redwing2.r library(lsmeans) library(nlme) #library(lme4) # not used #library(lmertest) # not used library(multcomp) # get the data # you may want to change the path to where you

More information

Statistical Analysis of Series of N-of-1 Trials Using R. Artur Araujo

Statistical Analysis of Series of N-of-1 Trials Using R. Artur Araujo Statistical Analysis of Series of N-of-1 Trials Using R Artur Araujo March 2016 Acknowledgements I would like to thank Boehringer Ingelheim GmbH for having paid my tuition fees at the University of Sheffield

More information

Example Using Missing Data 1

Example Using Missing Data 1 Ronald H. Heck and Lynn N. Tabata 1 Example Using Missing Data 1 Creating the Missing Data Variable (Miss) Here is a data set (achieve subset MANOVAmiss.sav) with the actual missing data on the outcomes.

More information

I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN

I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN SAS for HLM Edps/Psych/Stat/ 587 Carolyn J. Anderson Department of Educational Psychology I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN SAS for HLM Slide 1 of 16 Outline SAS & (for Random

More information

Package GWRM. R topics documented: July 31, Type Package

Package GWRM. R topics documented: July 31, Type Package Type Package Package GWRM July 31, 2017 Title Generalized Waring Regression Model for Count Data Version 2.1.0.3 Date 2017-07-18 Maintainer Antonio Jose Saez-Castillo Depends R (>= 3.0.0)

More information

Inference in mixed models in R - beyond the usual asymptotic likelihood ratio test

Inference in mixed models in R - beyond the usual asymptotic likelihood ratio test 1 / 42 Inference in mixed models in R - beyond the usual asymptotic likelihood ratio test Søren Højsgaard 1 Ulrich Halekoh 2 1 Department of Mathematical Sciences Aalborg University, Denmark sorenh@math.aau.dk

More information

An Introduction to Growth Curve Analysis using Structural Equation Modeling

An Introduction to Growth Curve Analysis using Structural Equation Modeling An Introduction to Growth Curve Analysis using Structural Equation Modeling James Jaccard New York University 1 Overview Will introduce the basics of growth curve analysis (GCA) and the fundamental questions

More information

Using R for Analyzing Delay Discounting Choice Data. analysis of discounting choice data requires the use of tools that allow for repeated measures

Using R for Analyzing Delay Discounting Choice Data. analysis of discounting choice data requires the use of tools that allow for repeated measures Using R for Analyzing Delay Discounting Choice Data Logistic regression is available in a wide range of statistical software packages, but the analysis of discounting choice data requires the use of tools

More information

Lecture 25: Review I

Lecture 25: Review I Lecture 25: Review I Reading: Up to chapter 5 in ISLR. STATS 202: Data mining and analysis Jonathan Taylor 1 / 18 Unsupervised learning In unsupervised learning, all the variables are on equal standing,

More information

Generalized least squares (GLS) estimates of the level-2 coefficients,

Generalized least squares (GLS) estimates of the level-2 coefficients, Contents 1 Conceptual and Statistical Background for Two-Level Models...7 1.1 The general two-level model... 7 1.1.1 Level-1 model... 8 1.1.2 Level-2 model... 8 1.2 Parameter estimation... 9 1.3 Empirical

More information

Mixed Models with R: Non-linear Models Asymptotic Functions of Time

Mixed Models with R: Non-linear Models Asymptotic Functions of Time SCS 2017: Longitudinal and Nested Data Mixed Models with R: Non-linear Models Asymptotic Functions of Time Georges Monette, March 2017 2 2 3 3 4 4 5 5 6 6 7 7 Modeling individual trajectories A good strategy

More information

HLM versus SEM Perspectives on Growth Curve Modeling. Hsueh-Sheng Wu CFDR Workshop Series August 3, 2015

HLM versus SEM Perspectives on Growth Curve Modeling. Hsueh-Sheng Wu CFDR Workshop Series August 3, 2015 HLM versus SEM Perspectives on Growth Curve Modeling Hsueh-Sheng Wu CFDR Workshop Series August 3, 2015 1 Outline What is Growth Curve Modeling (GCM) Advantages of GCM Disadvantages of GCM Graphs of trajectories

More information

RESEARCH ARTICLE. Growth Rate Models: Emphasizing Growth Rate Analysis through Growth Curve Modeling

RESEARCH ARTICLE. Growth Rate Models: Emphasizing Growth Rate Analysis through Growth Curve Modeling RESEARCH ARTICLE Growth Rate Models: Emphasizing Growth Rate Analysis through Growth Curve Modeling Zhiyong Zhang a, John J. McArdle b, and John R. Nesselroade c a University of Notre Dame; b University

More information

Poisson Regression and Model Checking

Poisson Regression and Model Checking Poisson Regression and Model Checking Readings GH Chapter 6-8 September 27, 2017 HIV & Risk Behaviour Study The variables couples and women_alone code the intervention: control - no counselling (both 0)

More information

Stat 4510/7510 Homework 4

Stat 4510/7510 Homework 4 Stat 45/75 1/7. Stat 45/75 Homework 4 Instructions: Please list your name and student number clearly. In order to receive credit for a problem, your solution must show sufficient details so that the grader

More information

Constrained Optimal Sample Allocation in Multilevel Randomized Experiments Using PowerUpR

Constrained Optimal Sample Allocation in Multilevel Randomized Experiments Using PowerUpR Constrained Optimal Sample Allocation in Multilevel Randomized Experiments Using PowerUpR Metin Bulus & Nianbo Dong University of Missouri March 3, 2017 Contents Introduction PowerUpR Package COSA Functions

More information

Analyzing Correlated Data in SAS

Analyzing Correlated Data in SAS Paper 1251-2017 Analyzing Correlated Data in SAS Niloofar Ramezani, University of Northern Colorado ABSTRACT Correlated data are extensively used across disciplines when modeling data with any type of

More information

Exploratory model analysis

Exploratory model analysis Exploratory model analysis with R and GGobi Hadley Wickham 6--8 Introduction Why do we build models? There are two basic reasons: explanation or prediction [Ripley, 4]. Using large ensembles of models

More information

DETAILED CONTENTS. About the Editor About the Contributors PART I. GUIDE 1

DETAILED CONTENTS. About the Editor About the Contributors PART I. GUIDE 1 DETAILED CONTENTS Preface About the Editor About the Contributors xiii xv xvii PART I. GUIDE 1 1. Fundamentals of Hierarchical Linear and Multilevel Modeling 3 Introduction 3 Why Use Linear Mixed/Hierarchical

More information

SLStats.notebook. January 12, Statistics:

SLStats.notebook. January 12, Statistics: Statistics: 1 2 3 Ways to display data: 4 generic arithmetic mean sample 14A: Opener, #3,4 (Vocabulary, histograms, frequency tables, stem and leaf) 14B.1: #3,5,8,9,11,12,14,15,16 (Mean, median, mode,

More information

An introduction to SPSS

An introduction to SPSS An introduction to SPSS To open the SPSS software using U of Iowa Virtual Desktop... Go to https://virtualdesktop.uiowa.edu and choose SPSS 24. Contents NOTE: Save data files in a drive that is accessible

More information

Study Guide. Module 1. Key Terms

Study Guide. Module 1. Key Terms Study Guide Module 1 Key Terms general linear model dummy variable multiple regression model ANOVA model ANCOVA model confounding variable squared multiple correlation adjusted squared multiple correlation

More information

Ronald H. Heck 1 EDEP 606 (F2015): Multivariate Methods rev. November 16, 2015 The University of Hawai i at Mānoa

Ronald H. Heck 1 EDEP 606 (F2015): Multivariate Methods rev. November 16, 2015 The University of Hawai i at Mānoa Ronald H. Heck 1 In this handout, we will address a number of issues regarding missing data. It is often the case that the weakest point of a study is the quality of the data that can be brought to bear

More information

ANNOUNCING THE RELEASE OF LISREL VERSION BACKGROUND 2 COMBINING LISREL AND PRELIS FUNCTIONALITY 2 FIML FOR ORDINAL AND CONTINUOUS VARIABLES 3

ANNOUNCING THE RELEASE OF LISREL VERSION BACKGROUND 2 COMBINING LISREL AND PRELIS FUNCTIONALITY 2 FIML FOR ORDINAL AND CONTINUOUS VARIABLES 3 ANNOUNCING THE RELEASE OF LISREL VERSION 9.1 2 BACKGROUND 2 COMBINING LISREL AND PRELIS FUNCTIONALITY 2 FIML FOR ORDINAL AND CONTINUOUS VARIABLES 3 THREE-LEVEL MULTILEVEL GENERALIZED LINEAR MODELS 3 FOUR

More information

Canadian National Longitudinal Survey of Children and Youth (NLSCY)

Canadian National Longitudinal Survey of Children and Youth (NLSCY) Canadian National Longitudinal Survey of Children and Youth (NLSCY) Fathom workshop activity For more information about the survey, see: http://www.statcan.ca/ Daily/English/990706/ d990706a.htm Notice

More information

STATISTICS (STAT) Statistics (STAT) 1

STATISTICS (STAT) Statistics (STAT) 1 Statistics (STAT) 1 STATISTICS (STAT) STAT 2013 Elementary Statistics (A) Prerequisites: MATH 1483 or MATH 1513, each with a grade of "C" or better; or an acceptable placement score (see placement.okstate.edu).

More information

Correctly Compute Complex Samples Statistics

Correctly Compute Complex Samples Statistics SPSS Complex Samples 15.0 Specifications Correctly Compute Complex Samples Statistics When you conduct sample surveys, use a statistics package dedicated to producing correct estimates for complex sample

More information

Goals of the Lecture. SOC6078 Advanced Statistics: 9. Generalized Additive Models. Limitations of the Multiple Nonparametric Models (2)

Goals of the Lecture. SOC6078 Advanced Statistics: 9. Generalized Additive Models. Limitations of the Multiple Nonparametric Models (2) SOC6078 Advanced Statistics: 9. Generalized Additive Models Robert Andersen Department of Sociology University of Toronto Goals of the Lecture Introduce Additive Models Explain how they extend from simple

More information

Lecture 24: Generalized Additive Models Stat 704: Data Analysis I, Fall 2010

Lecture 24: Generalized Additive Models Stat 704: Data Analysis I, Fall 2010 Lecture 24: Generalized Additive Models Stat 704: Data Analysis I, Fall 2010 Tim Hanson, Ph.D. University of South Carolina T. Hanson (USC) Stat 704: Data Analysis I, Fall 2010 1 / 26 Additive predictors

More information

Resampling Methods. Levi Waldron, CUNY School of Public Health. July 13, 2016

Resampling Methods. Levi Waldron, CUNY School of Public Health. July 13, 2016 Resampling Methods Levi Waldron, CUNY School of Public Health July 13, 2016 Outline and introduction Objectives: prediction or inference? Cross-validation Bootstrap Permutation Test Monte Carlo Simulation

More information

Section 3.2: Multiple Linear Regression II. Jared S. Murray The University of Texas at Austin McCombs School of Business

Section 3.2: Multiple Linear Regression II. Jared S. Murray The University of Texas at Austin McCombs School of Business Section 3.2: Multiple Linear Regression II Jared S. Murray The University of Texas at Austin McCombs School of Business 1 Multiple Linear Regression: Inference and Understanding We can answer new questions

More information

Regression Lab 1. The data set cholesterol.txt available on your thumb drive contains the following variables:

Regression Lab 1. The data set cholesterol.txt available on your thumb drive contains the following variables: Regression Lab The data set cholesterol.txt available on your thumb drive contains the following variables: Field Descriptions ID: Subject ID sex: Sex: 0 = male, = female age: Age in years chol: Serum

More information

Multiple Linear Regression

Multiple Linear Regression Multiple Linear Regression Rebecca C. Steorts, Duke University STA 325, Chapter 3 ISL 1 / 49 Agenda How to extend beyond a SLR Multiple Linear Regression (MLR) Relationship Between the Response and Predictors

More information

Motivating Example. Missing Data Theory. An Introduction to Multiple Imputation and its Application. Background

Motivating Example. Missing Data Theory. An Introduction to Multiple Imputation and its Application. Background An Introduction to Multiple Imputation and its Application Craig K. Enders University of California - Los Angeles Department of Psychology cenders@psych.ucla.edu Background Work supported by Institute

More information

Statistics Lab #7 ANOVA Part 2 & ANCOVA

Statistics Lab #7 ANOVA Part 2 & ANCOVA Statistics Lab #7 ANOVA Part 2 & ANCOVA PSYCH 710 7 Initialize R Initialize R by entering the following commands at the prompt. You must type the commands exactly as shown. options(contrasts=c("contr.sum","contr.poly")

More information

Predictive Checking. Readings GH Chapter 6-8. February 8, 2017

Predictive Checking. Readings GH Chapter 6-8. February 8, 2017 Predictive Checking Readings GH Chapter 6-8 February 8, 2017 Model Choice and Model Checking 2 Questions: 1. Is my Model good enough? (no alternative models in mind) 2. Which Model is best? (comparison

More information

Chapter 6: Linear Model Selection and Regularization

Chapter 6: Linear Model Selection and Regularization Chapter 6: Linear Model Selection and Regularization As p (the number of predictors) comes close to or exceeds n (the sample size) standard linear regression is faced with problems. The variance of the

More information

Exponential Random Graph Models for Social Networks

Exponential Random Graph Models for Social Networks Exponential Random Graph Models for Social Networks ERGM Introduction Martina Morris Departments of Sociology, Statistics University of Washington Departments of Sociology, Statistics, and EECS, and Institute

More information

Growth Curve Modeling in Stata. Hsueh-Sheng Wu CFDR Workshop Series February 12, 2018

Growth Curve Modeling in Stata. Hsueh-Sheng Wu CFDR Workshop Series February 12, 2018 Growth Curve Modeling in Stata Hsueh-Sheng Wu CFDR Workshop Series February 12, 2018 1 Outline What is Growth Curve Modeling (GCM) Advantages of GCM Disadvantages of GCM Graphs of trajectories Inter-person

More information

Regression on SAT Scores of 374 High Schools and K-means on Clustering Schools

Regression on SAT Scores of 374 High Schools and K-means on Clustering Schools Regression on SAT Scores of 374 High Schools and K-means on Clustering Schools Abstract In this project, we study 374 public high schools in New York City. The project seeks to use regression techniques

More information

Generalized additive models I

Generalized additive models I I Patrick Breheny October 6 Patrick Breheny BST 764: Applied Statistical Modeling 1/18 Introduction Thus far, we have discussed nonparametric regression involving a single covariate In practice, we often

More information

Introduction. Overview

Introduction. Overview Avoiding the misuse of BLUP in behavioral ecology: II. Multivariate modelling for individual plasticity (ASReml-R tutorial) Thomas M. Houslay & Alastair J. Wilson January 2017 Introduction Overview This

More information

PSY 9556B (Jan8) Design Issues and Missing Data Continued Examples of Simulations for Projects

PSY 9556B (Jan8) Design Issues and Missing Data Continued Examples of Simulations for Projects PSY 9556B (Jan8) Design Issues and Missing Data Continued Examples of Simulations for Projects Let s create a data for a variable measured repeatedly over five occasions We could create raw data (for each

More information

Modelling Proportions and Count Data

Modelling Proportions and Count Data Modelling Proportions and Count Data Rick White May 4, 2016 Outline Analysis of Count Data Binary Data Analysis Categorical Data Analysis Generalized Linear Models Questions Types of Data Continuous data:

More information

MODEL SELECTION AND MODEL AVERAGING IN THE PRESENCE OF MISSING VALUES

MODEL SELECTION AND MODEL AVERAGING IN THE PRESENCE OF MISSING VALUES UNIVERSITY OF GLASGOW MODEL SELECTION AND MODEL AVERAGING IN THE PRESENCE OF MISSING VALUES by KHUNESWARI GOPAL PILLAY A thesis submitted in partial fulfillment for the degree of Doctor of Philosophy in

More information

IQR = number. summary: largest. = 2. Upper half: Q3 =

IQR = number. summary: largest. = 2. Upper half: Q3 = Step by step box plot Height in centimeters of players on the 003 Women s Worldd Cup soccer team. 157 1611 163 163 164 165 165 165 168 168 168 170 170 170 171 173 173 175 180 180 Determine the 5 number

More information

Repeated Measures Part 4: Blood Flow data

Repeated Measures Part 4: Blood Flow data Repeated Measures Part 4: Blood Flow data /* bloodflow.sas */ options linesize=79 pagesize=100 noovp formdlim='_'; title 'Two within-subjecs factors: Blood flow data (NWK p. 1181)'; proc format; value

More information

Spatial Patterns Point Pattern Analysis Geographic Patterns in Areal Data

Spatial Patterns Point Pattern Analysis Geographic Patterns in Areal Data Spatial Patterns We will examine methods that are used to analyze patterns in two sorts of spatial data: Point Pattern Analysis - These methods concern themselves with the location information associated

More information

Analysis of variance - ANOVA

Analysis of variance - ANOVA Analysis of variance - ANOVA Based on a book by Julian J. Faraway University of Iceland (UI) Estimation 1 / 50 Anova In ANOVAs all predictors are categorical/qualitative. The original thinking was to try

More information

Stat 5100 Handout #14.a SAS: Logistic Regression

Stat 5100 Handout #14.a SAS: Logistic Regression Stat 5100 Handout #14.a SAS: Logistic Regression Example: (Text Table 14.3) Individuals were randomly sampled within two sectors of a city, and checked for presence of disease (here, spread by mosquitoes).

More information

Extensions to the Cox Model: Stratification

Extensions to the Cox Model: Stratification Extensions to the Cox Model: Stratification David M. Rocke May 30, 2017 David M. Rocke Extensions to the Cox Model: Stratification May 30, 2017 1 / 13 Anderson Data Remission survival times on 42 leukemia

More information

The lmekin function. Terry Therneau Mayo Clinic. May 11, 2018

The lmekin function. Terry Therneau Mayo Clinic. May 11, 2018 The lmekin function Terry Therneau Mayo Clinic May 11, 2018 1 Background The original kinship library had an implementation of linear mixed effects models using the matrix code found in coxme. Since the

More information

Week 11: Interpretation plus

Week 11: Interpretation plus Week 11: Interpretation plus Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline A bit of a patchwork

More information

Additional Issues: Random effects diagnostics, multiple comparisons

Additional Issues: Random effects diagnostics, multiple comparisons : Random diagnostics, multiple Austin F. Frank, T. Florian April 30, 2009 The dative dataset Original analysis in Bresnan et al (2007) Data obtained from languager (Baayen 2008) Data describing the realization

More information

Non-Linear Regression. Business Analytics Practice Winter Term 2015/16 Stefan Feuerriegel

Non-Linear Regression. Business Analytics Practice Winter Term 2015/16 Stefan Feuerriegel Non-Linear Regression Business Analytics Practice Winter Term 2015/16 Stefan Feuerriegel Today s Lecture Objectives 1 Understanding the need for non-parametric regressions 2 Familiarizing with two common

More information

Modelling Proportions and Count Data

Modelling Proportions and Count Data Modelling Proportions and Count Data Rick White May 5, 2015 Outline Analysis of Count Data Binary Data Analysis Categorical Data Analysis Generalized Linear Models Questions Types of Data Continuous data:

More information

Generalized Additive Models

Generalized Additive Models :p Texts in Statistical Science Generalized Additive Models An Introduction with R Simon N. Wood Contents Preface XV 1 Linear Models 1 1.1 A simple linear model 2 Simple least squares estimation 3 1.1.1

More information

Fathom Dynamic Data TM Version 2 Specifications

Fathom Dynamic Data TM Version 2 Specifications Data Sources Fathom Dynamic Data TM Version 2 Specifications Use data from one of the many sample documents that come with Fathom. Enter your own data by typing into a case table. Paste data from other

More information

This is called a linear basis expansion, and h m is the mth basis function For example if X is one-dimensional: f (X) = β 0 + β 1 X + β 2 X 2, or

This is called a linear basis expansion, and h m is the mth basis function For example if X is one-dimensional: f (X) = β 0 + β 1 X + β 2 X 2, or STA 450/4000 S: February 2 2005 Flexible modelling using basis expansions (Chapter 5) Linear regression: y = Xβ + ɛ, ɛ (0, σ 2 ) Smooth regression: y = f (X) + ɛ: f (X) = E(Y X) to be specified Flexible

More information

Clustering. Robert M. Haralick. Computer Science, Graduate Center City University of New York

Clustering. Robert M. Haralick. Computer Science, Graduate Center City University of New York Clustering Robert M. Haralick Computer Science, Graduate Center City University of New York Outline K-means 1 K-means 2 3 4 5 Clustering K-means The purpose of clustering is to determine the similarity

More information

Package mcemglm. November 29, 2015

Package mcemglm. November 29, 2015 Type Package Package mcemglm November 29, 2015 Title Maximum Likelihood Estimation for Generalized Linear Mixed Models Version 1.1 Date 2015-11-28 Author Felipe Acosta Archila Maintainer Maximum likelihood

More information

Multiple Regression White paper

Multiple Regression White paper +44 (0) 333 666 7366 Multiple Regression White paper A tool to determine the impact in analysing the effectiveness of advertising spend. Multiple Regression In order to establish if the advertising mechanisms

More information

Chapter 1: Random Intercept and Random Slope Models

Chapter 1: Random Intercept and Random Slope Models Chapter 1: Random Intercept and Random Slope Models This chapter is a tutorial which will take you through the basic procedures for specifying a multilevel model in MLwiN, estimating parameters, making

More information

Using the SemiPar Package

Using the SemiPar Package Using the SemiPar Package NICHOLAS J. SALKOWSKI Division of Biostatistics, School of Public Health, University of Minnesota, Minneapolis, MN 55455, USA salk0008@umn.edu May 15, 2008 1 Introduction The

More information

xxm Reference Manual

xxm Reference Manual xxm Reference Manual February 21, 2013 Type Package Title Structural Equation Modeling for Dependent Data Version 0.5.0 Date 2013-02-06 Author Paras Mehta Depends Maintainer

More information

Salary 9 mo : 9 month salary for faculty member for 2004

Salary 9 mo : 9 month salary for faculty member for 2004 22s:52 Applied Linear Regression DeCook Fall 2008 Lab 3 Friday October 3. The data Set In 2004, a study was done to examine if gender, after controlling for other variables, was a significant predictor

More information

Online Supplementary Appendix for. Dziak, Nahum-Shani and Collins (2012), Multilevel Factorial Experiments for Developing Behavioral Interventions:

Online Supplementary Appendix for. Dziak, Nahum-Shani and Collins (2012), Multilevel Factorial Experiments for Developing Behavioral Interventions: Online Supplementary Appendix for Dziak, Nahum-Shani and Collins (2012), Multilevel Factorial Experiments for Developing Behavioral Interventions: Power, Sample Size, and Resource Considerations 1 Appendix

More information

Technical Appendix B

Technical Appendix B Technical Appendix B School Effectiveness Models and Analyses Overview Pierre Foy and Laura M. O Dwyer Many factors lead to variation in student achievement. Through data analysis we seek out those factors

More information

Pine Trees and Comas: Asymptotic Functions of Time Part II

Pine Trees and Comas: Asymptotic Functions of Time Part II SPIDA 2009 Mixed Models with R Pine Trees and Comas: Asymptotic Functions of Time Part II Georges Monette 1 June 2009 e-mail: georges@yorku.ca web page: http://wiki.math.yorku.ca/spida_2009 1 with thanks

More information

Analyzing Longitudinal Data Using Regression Splines

Analyzing Longitudinal Data Using Regression Splines Analyzing Longitudinal Data Using Regression Splines Zhang Jin-Ting Dept of Stat & Appl Prob National University of Sinagpore August 18, 6 DSAP, NUS p.1/16 OUTLINE Motivating Longitudinal Data Parametric

More information

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions)

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions) THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533 MIDTERM EXAMINATION: October 14, 2005 Instructor: Val LeMay Time: 50 minutes 40 Marks FRST 430 50 Marks FRST 533 (extra questions) This examination

More information