Models for Clustered Data
|
|
- Theresa Phelps
- 5 years ago
- Views:
Transcription
1 Models for Clustered Data Edps/Psych/Soc 589 Carolyn J Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Spring 2019
2 Outline Notation NELS88 data Fixed Effects ANOVA Random Effects ANOVA Multiple Regression HLM and the general linear mixed model Reading: Snijders & Bosker, chapter 3 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
3 Notation Snijders & Bosker s notation j index for groups (macro-level units) N = number of groups j = 1,,N i index for individuals (micro-level units) n j = number of individuals in group j i = 1,,n j CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
4 Notation (continued) Y ij response or dependent variable y ij is a value on the response/dependent variable x ij explanatory variable n + = total number of level 1 observations, n + = N j=1 n j This is different from Snijder & Bosker (they use M) CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
5 NELS88 National Education Longitudinal Study: Conducted by National Center for Education Statistics of the US department of Education These data constitute the first in a series of longitudinal measurements of students starting in 8th grade These data were collected Spring 1988 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
6 NELS88: The Data for 10 Schools CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
7 Descriptive Statistics Math scores Total sample: N j n j = n + = 260, Ȳ = 5130, s = 1114 By School: sch id n j Mean Std Dev Min Max CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
8 Another Look at the Data Mean math scores ±1 standard deviation for the N = 10 schools School Mean Math Score +/ one Standard Deviation Math School CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
9 Review of Fixed Effects ANOVA The model: where Y ij = µ+α j +R ij µ is the overall mean (constant) α j is group j effect (constant) R ij is the residual or error (random) R ij N(0,σ 2 ) and independent Accounts for all group differences Only interested in the N groups CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
10 Example: NELS88 using 10 schools Math scores as response variable ANOVA Summary Table From SAS/GLM and MIXED (method=reml) Sum of Mean Source df Squares Square F p Model (school) < 0001 Error (residual) Corrected total CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
11 Example (continued) Only from SAS/MIXED: Maximum Likelihood Estimation Effect Num df Den df F value p school < 0001 Expected mean squares Sum of Mean Expected Error Source df squares square mean square term sch id Var(Res) + Q(sch id ) MS(Res Residual (Res) Var(Res) CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
12 Linear Regression Formulation of fixed effects ANOVA Y ij = µ j +R ij = µ+α j +R ij = β 0 +β 1 x 1ij +β 2 x 2ij ++β (N 1) x (N 1),ij +R ij where x kij = 1 if j = k, and 0 otherwise (ie, dummy codes) CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
13 Linear Regression in Matrix Notation Y 11 Y 21 Y 23,1 Y 1,2 Y 2,2 Y 20,2 Y 1,10 Y 20,10 = β o β 1 β 2 β 3 β 4 β 5 β 6 β 7 β 8 β 9 + R 11 R 21 R 23,1 R 1,2 R 2,2 R 20,2 R 1,10 R 20,10 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
14 Linear Regression in Matrix Notation Y 1 Y 2 = X 1 X 2 β + R 1 R 2 Y 10 X 10 R 10 Y = Xβ + R CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
15 Fixed Effects Model (continued) Y ij = β 0 +β 1 x 1ij +β 2 x 2ij ++β (N 1) x (N 1)ij +R ij The parameters β 0,β 1,,β N 1 are considered fixed The R ij s are random: R ij N(0,σ 2 ) and independent Therefore, Y ij N(β 0 +β 1 x 1ij ++β (N 1) x (N 1)ij,σ 2 ) CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
16 In Matrix Terms The model : Y = Xβ +R where β is an (N 1) vector of fixed parameters R is an (n + 1) vectors of random variables: R N n+ (0,σ 2 I) Y N n+ (Xβ,σ 2 I) Covariance matrix, σ σ 2 0 σ 2 0 I = 0 0 σ 2 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
17 Estimated model parameters, σ and β From the ANOVA table from SAS: ˆσ 2 = 7234 Solution for Fixed Effects β Standard Effect sch id Estimate Error df t Pr > t Intercept < 0001 sch id sch id sch id sch id sch id sch id sch id < 0001 sch id sch id sch id CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
18 Estimated model parameters, σ and β From the table from R: ˆσ 2 = 7234 Are these different from SAS? Solution for Fixed Effects Coefficients: Estimate Std Error t value Pr(> t ) (Intercept) < 2e 16 id id id id id id e 15 id id id CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
19 Random Effects ANOVA Situation: When groups are a random sample from some larger population of groups and you want to make inferences about this population Data are hierarchically structured data with no explanatory variables y CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
20 Random Effects ANOVA: The Model where Y ij = µ + U }{{} j +R ij }{{} fixed stochastic µ is the overall mean (constant) U j is group j effect (random) U j N(0,τ 2 ) and independent R ij is the w/in groups residual or error (random) R ij N(0,σ 2 ) and independent U j and R ij are independent, ie, cov(u j,r ij ) = 0 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
21 Notes Regarding Random Effects ANOVA If τ 2 > 0, group differences exist Instead of estimating N parameters for groups, we estimate a single parameter, τ 2 The variance of Y ij = (τ 2 +σ 2 ) Random effects ANOVA can be represented as a linear regression model with a random intercept CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
22 Random Effects ANOVA As Linear Regression Model: No explanatory variables Y ij = β 0j +R ij The intercept: β 0j = γ +U j where γ is Constant (overall mean) and U j is Random, N(0,τ 2 ) β 0j is random with β 0j N(γ,τ 2 ) U j are Level 2 residuals, R ij are Level 1 residuals, and they re independent The empty or null HLM CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
23 Random Effects ANOVA: NELS88 Using SAS/MIXED with Maximum likelihood estimation: Parameter Estimate std error Fixed effect(s) γ Variance parameters intercept τ residual σ R does not give std error, but it gives Std Dev = τ 2 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
24 A Closer Look (Intuitive) Y ij = β 0j +R ij = γ +U j +R ij Y ij is random due to U j and R ij Since U j and R ij are independent and normally distributed, (i) Y ij N(γ,(τ 2 +σ 2 )) (ii) cov(y ij,y kj ) = 0 (between groups) eg, Y ij = γ +U j +R ij Y i j = γ +U j +R i j CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
25 A Closer Look (continued) Y ij = β 0j +R ij = γ +U j +R ij Within groups, observations are dependent Y ij = γ +U j +R ij Y i j = γ +U j +R i j γ is fixed U j is random but the same value for both i & i R ij and R i j are random and different values for i & i CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
26 Within Group Dependency (formal) cov(y ij,y i j) E[(Y ij E(Y ij ))(Y i j E(Y i j))] = E[((γ +U j +R ij ) γ)((γ +U j +R i j) γ)] = E[(U j +R ij )(U j +R i j)] = E[U 2 j +U jr i j +R ij U j +R ij R i j] = E[U 2 j]+e[u j R i j]+e[r ij U j ]+E[R ij R i j] = E[U 2 j] = E[(U j 0) 2 ] var(u j ) = τ 2 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
27 Intra-class Correlation Measure of within group dependency ρ I corr(y ij,y i j) = = = cov(y ij,y i j) var(yij ) var(y i j) τ 2 τ 2 +σ 2 τ 2 +σ 2 τ 2 τ 2 +σ 2 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
28 Intra-class Correlation: ρ I ρ I = τ2 τ 2 +σ 2 Assuming within group dependency is the same in all groups If τ 2 = 0, then don t need HLM Could be used as a measure of how much variance accounted for by the model, eg, Our NELS88 example, ˆρ I = = 30 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
29 Matrix representation of Y ij = γ +U j +R ij Y 11 Y 21 Y 23,1 Y 1,2 Y 2,2 Y 20,2 Y 1,10 Y 20,10 = ( γ ) + U 1 U 1 U 1 U 2 U 2 U 2 U 10 U 10 + R 11 R 21 R 23,1 R 1,2 R 2,2 R 20,2 R 1,10 R 20,10 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
30 Matrix representation (continued) Y 1 Y 2 = X 1 X 2 β + U 1 U 2 + R 1 R 2 Y 10 X 10 U 10 R 10 Y = Xβ + U + R CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
31 Matrix Representation (continued) For group j, the distribution of Y j is Y j N nj (X j β,σ j ) where X j = 1 j is the an (n j 1) column vector with elements equal to one β = γ The covariance matrix for the j th group is an (n j n j ) symmetric matrix with elements Σ j = σ 2 I j +τ 2 1 j 1 j CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
32 Covariance Matrix Σ j (n j n j ) = σ 2 I j + τ 2 1 j 1 j = σ τ (τ 2 +σ 2 ) τ 2 τ 2 τ 2 (τ 2 +σ 2 ) τ 2 = τ 2 τ 2 (τ 2 +σ 2 ) CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
33 Covariance Matrix (continued) Notes: Σ j = σ 2 I j +τ 2 1 j 1 j Compound symmetry Only difference between groups is the size of this matrix (ie, (n j n j )) For simplicity, drop the sub-script from Σ CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
34 Covariance Matrix: Y For the whole data vector Y, the covariance matrix is of size (n + n + ) and equals Σ 0 0 (n 1 n 1 ) 0 Σ 0 (n 2 n 2 ) Σ (n N n N ) CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
35 Summary: Random Effects ANOVA Model isn t too interesting No explanatory variables If we add variables to the regression, we only have a shift intercept in the intercept CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
36 Multiple Regression Intercepts and Slopes as outcomes Two stages: Stage 1: Fit multiple regression model to each group (level 1 analysis) ie, Summarize groups by their regression parameters Stage 2: Use the estimated intercept and slope coefficients as outcomes (level 2 analysis) ie, Analysis of the summary statistics CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
37 NELS88: Overall Regression Before we do the two stage analysis, Linear Regression of Math on Time Spent Doing Homework Fitted Math Scores from Linear Regression Time Spent Doing Homework CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
38 Individual Schools Data CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
39 Individual Schools Regressions Separate Regression for Each School Math Scores Time Spent Doing Homework CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
40 Two Stage Example: NELS88 Stage 1: Within groups regressions Y ij = student s math score x ij = time spent doing homework Proposition: More time spent doing homework, the higher the math score Appropriate model: (math) ij = β 0j +β 1j (homew) ij +R ij where R ij N(0,σ 2 ) Y ij = β 0j +β 1j x ij +R ij CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
41 Stage One Model fit to each of the 10 NELS88 schools: School ID ˆβ0j ˆβ1j R CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
42 Stage One (continued) Parameter n mean std dev se variance ˆβ 0j ˆβ 1j CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
43 Stage Two: NELS88 We use the estimated regression parameters as response variables and try to model the parameters We ll start with the intercepts Example simple model for the ˆβ 0j s: ˆβ 0j = γ 0 +U 0j CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
44 Stage Two: Intercepts The REG Procedure Model: MODEL1 Dependent Variable: alpha Analysis of Variance Sum of Mean Source DF Squares Square F Pr > F Model 0 0 Error Corrected Total CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
45 Stage Two: Intercepts Root MSE R-Square Dependent Mean Adj R-Sq Coeff Var Parameter Standard Variable DF Estimate Error t Pr > t Intercept < 0001 Descriptives statistics CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
46 A little more complex model Model for the level 2 analysis: ˆβ 0j = γ 00 +γ 01 (mean SES j )+U 0j = γ 00 +γ 01 Z j +U 0j where U 0j N(0,τ 2 0 ) CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
47 SAS PROC REG CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
48 SAS PROC REG (intercepts) The REG Procedure Model: MODEL2 Dependent Variable: alpha Analysis of Variance Sum of Mean Source DF Squares Square F Pr > F Model Error Corrected Total CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
49 SAS PROC REG (intercepts) Root MSE R-Square Dependent Mean Adj R Coeff Var Parameter Estimates Parameter Standard Variable DF Estimate Error t Pr > t Intercept < 0001 meanses Conclusions? Note regarding p-value decimal places CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
50 Stage Two: Slopes If the estimated slopes differ over groups, the effect of time spent doing homework on math scores changes depending on what school a student is in Simplest case: no explanatory variable The model: ˆβ 1j = γ 10 +U 1j where U 1j N(0,τ 2 1 ) CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
51 Slopes: No Explanatory Variables The REG Procedure Model: MODEL1 Dependent Variable: beta Analysis of Variance Sum of Mean Source DF Squares Square F Pr > F Model 0 0 Error Corrected Total CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
52 Slopes: No Explanatory Variables Root MSE R-Square Dependent Mean Adj R-Sq Coeff Var Parameter Estimates Parameter Standard Variable F Estimate Error t Pr > t Intercept Descriptives statistics: see page 41 CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
53 Slopes: More Complex Model Proposition: The higher the SES, the less of an effect time spent doing homework has on math achievement Reasoning for this: Schools with higher mean SES, more wealthy area, more money for schools, better school Diagram for this: Z x y CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
54 SAS PROC REG CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
55 Slopes: SAS PROC REG Output The model: ˆβ 1j = γ 10 +γ 11 (mean SES) j +U 1j where U 1j N(0,τ1 2) Dependent Variable: beta Analysis of Variance Sum of Mean Source DF Squares Square F Pr>F Model Error Corrected Total CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
56 Slopes: SAS PROC REG Output Root MSE Dependent Mean R-Square Adj R Parameter Standard Variable DF Estimate Error t Pr> t Intercept meanses Conclusions? Problems with this analysis? CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
57 Possible Improvements To the two stage analysis of NELS88 Center SES Use multivariate (multiple) regression so that the intercepts and slopes are modeled simultaneously Would get an estimate of τ 01, covariance between U 0j and U 1j CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
58 Serious problems remain Lost information because regression coefficients are used to summarize groups The number of observations per group is not taken into account when analyzing the estimated regression coefficients (in the 2nd stage) Random variability is introduced by using estimated regression coefficients How can model fit to data be assessed? Incorrect estimation of standard errors (level 2) CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
59 A Simple Hierarchical Linear Models Level 1: Y ij = β 0j +β 1j x ij +R ij where R ij N(0,σ 2 ) and independent and more compactly, where Y j N(X j β j,σ 2 I)iid Y j = X j β j +R j CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
60 HLM: Level 2 Level 2: β 0j = γ 00 +U 0j β 1j = γ 10 +U 1j where ( U0j U 1j ) = N (( 0 0 ) ( τ 2, 0 τ 01 τ 01 τ1 2 )) iid or more compactly, where U j N(0,T)iid β j = Z j Γ+U j CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
61 Linear Mixed Model Put models for β 0j and β 1j into the level 1 model: Y ij = β 0j +β 1j x ij +R ij = (γ 0o +U 0j )+(γ 1o +U 1j )x ij +R ij = γ 00 +γ 10 x ij }{{} +U 0j +U 1j x ij +R ij }{{} fixed part random part CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
62 Linear Mixed Model (continued) Given all the assumptions of the hierarchical model, Y ij N((γ 00 +γ 10 x ij ),var(y ij )) iid where var(y ij ) = (τ τ 01x ij +τ 2 1 x2 ij )+σ2 This is the Marginal Model for Y ij CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
63 In Matrix Form The Model: where Y j = X j Γ+Z j U j +R j Y j N nj (X j Γ,V j )iid and the covariance matrix equals, V j = Z j TZ j +σ 2 I and later for longitudinal data V j = Z j TZ j +Σ j CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
64 The Marginal Model The distinction between the hierarchical formulation (and linear mixed model) and the marginal model are important with respect to Interpretation Estimation Inference but more on this later CJ Anderson (Illinois) Hierarchical Linear Models/Multilevel Analysis Spring / 64
Models for Clustered Data
Models for Clustered Data Edps/Psych/Stat 587 Carolyn J Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2017 Outline Notation NELS88 data Fixed Effects ANOVA
More informationRandom 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 informationEstimation: Problems & Solutions
Estimation: Problems & Solutions Edps/Psych/Soc 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Spring 2019 Outline 1. Introduction: Estimation
More informationEstimation: Problems & Solutions
Estimation: Problems & Solutions Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2017 Outline 1. Introduction: Estimation of
More informationSerial Correlation. Edps/Psych/Stat 587. Carolyn J. Anderson. Fall Department of Educational Psychology
Serial Correlation Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 017 Model for Level 1 Residuals There are three sources
More informationRandom Effects. Edps/Psych/Stat 587. Carolyn J. Anderson. Fall Department of Educational Psychology. c Board of Trustees, University of Illinois
Random Effects Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2017 Outline Introduction Empirical Bayes inference Henderson
More informationRandom Effects. Edps/Psych/Stat 587. Carolyn J. Anderson. Fall Department of Educational Psychology. university of illinois at urbana-champaign
Random Effects 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 Fall 2012 Outline Introduction Empirical Bayes inference
More informationChapter 1 Linear Regression with One Predictor
STAT 525 FALL 2018 Chapter 1 Linear Regression with One Predictor Professor Min Zhang Goals of Regression Analysis Serve three purposes Describes an association between X and Y In some applications, the
More informationLongitudinal Data Analysis via Linear Mixed Model
Longitudinal Data Analysis via Linear Mixed Model Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2017 Outline Introduction
More informationTopic 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 informationGeneral 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 informationT-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 informationSAS 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 informationHierarchical Linear Models (HLM) Using R Package nlme. Interpretation. 2 = ( x 2) u 0j. e ij
Hierarchical Linear Models (HLM) Using R Package nlme Interpretation I. The Null Model Level 1 (student level) model is mathach ij = β 0j + e ij Level 2 (school level) model is β 0j = γ 00 + u 0j Combined
More informationSimple Linear Regression
Simple Linear Regression MATH 282A Introduction to Computational Statistics University of California, San Diego Instructor: Ery Arias-Castro http://math.ucsd.edu/ eariasca/math282a.html MATH 282A University
More informationSimple Linear Regression
Simple Linear Regression EdPsych 580 C.J. Anderson Fall 2005 Simple Linear Regression p. 1/80 Outline 1. What it is and why it s useful 2. How 3. Statistical Inference 4. Examining assumptions (diagnostics)
More informationTopic 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 informationMultiple Linear Regression
Multiple Linear Regression Simple linear regression tries to fit a simple line between two variables Y and X. If X is linearly related to Y this explains some of the variability in Y. In most cases, there
More informationAn 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 informationChapter 6 Multiple Regression
STAT 525 FALL 2018 Chapter 6 Multiple Regression Professor Min Zhang The Data and Model Still have single response variable Y Now have multiple explanatory variables Examples: Blood Pressure vs Age, Weight,
More informationStatistical Inference: The Marginal Model
Statistical Inference: The Marginal Model Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2017 Outline Inference for fixed
More informationEconometrics I KS. Module 2: Multivariate Linear Regression. Alexander Ahammer. This version: April 16, 2018
Econometrics I KS Module 2: Multivariate Linear Regression Alexander Ahammer Department of Economics Johannes Kepler University of Linz This version: April 16, 2018 Alexander Ahammer (JKU) Module 2: Multivariate
More informationChapter 1: Linear Regression with One Predictor Variable also known as: Simple Linear Regression Bivariate Linear Regression
BSTT523: Kutner et al., Chapter 1 1 Chapter 1: Linear Regression with One Predictor Variable also known as: Simple Linear Regression Bivariate Linear Regression Introduction: Functional relation between
More informationSTOR 455 STATISTICAL METHODS I
STOR 455 STATISTICAL METHODS I Jan Hannig Mul9variate Regression Y=X β + ε X is a regression matrix, β is a vector of parameters and ε are independent N(0,σ) Es9mated parameters b=(x X) - 1 X Y Predicted
More information22s:152 Applied Linear Regression. Take random samples from each of m populations.
22s:152 Applied Linear Regression Chapter 8: ANOVA NOTE: We will meet in the lab on Monday October 10. One-way ANOVA Focuses on testing for differences among group means. Take random samples from each
More information1. (Rao example 11.15) A study measures oxygen demand (y) (on a log scale) and five explanatory variables (see below). Data are available as
ST 51, Summer, Dr. Jason A. Osborne Homework assignment # - Solutions 1. (Rao example 11.15) A study measures oxygen demand (y) (on a log scale) and five explanatory variables (see below). Data are available
More informationCh 2: Simple Linear Regression
Ch 2: Simple Linear Regression 1. Simple Linear Regression Model A simple regression model with a single regressor x is y = β 0 + β 1 x + ɛ, where we assume that the error ɛ is independent random component
More informationCorrelation and the Analysis of Variance Approach to Simple Linear Regression
Correlation and the Analysis of Variance Approach to Simple Linear Regression Biometry 755 Spring 2009 Correlation and the Analysis of Variance Approach to Simple Linear Regression p. 1/35 Correlation
More informationDe-mystifying random effects models
De-mystifying random effects models Peter J Diggle Lecture 4, Leahurst, October 2012 Linear regression input variable x factor, covariate, explanatory variable,... output variable y response, end-point,
More information22s:152 Applied Linear Regression. There are a couple commonly used models for a one-way ANOVA with m groups. Chapter 8: ANOVA
22s:152 Applied Linear Regression Chapter 8: ANOVA NOTE: We will meet in the lab on Monday October 10. One-way ANOVA Focuses on testing for differences among group means. Take random samples from each
More informationSTAT 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 informationExample: 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 information36-309/749 Experimental Design for Behavioral and Social Sciences. Dec 1, 2015 Lecture 11: Mixed Models (HLMs)
36-309/749 Experimental Design for Behavioral and Social Sciences Dec 1, 2015 Lecture 11: Mixed Models (HLMs) Independent Errors Assumption An error is the deviation of an individual observed outcome (DV)
More informationLecture 6 Multiple Linear Regression, cont.
Lecture 6 Multiple Linear Regression, cont. BIOST 515 January 22, 2004 BIOST 515, Lecture 6 Testing general linear hypotheses Suppose we are interested in testing linear combinations of the regression
More informationSimple 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 informationunadjusted model for baseline cholesterol 22:31 Monday, April 19,
unadjusted model for baseline cholesterol 22:31 Monday, April 19, 2004 1 Class Level Information Class Levels Values TRETGRP 3 3 4 5 SEX 2 0 1 Number of observations 916 unadjusted model for baseline cholesterol
More informationRandom Coefficient Model (a.k.a. multilevel model) (Adapted from UCLA Statistical Computing Seminars)
STAT:5201 Applied Statistic II Random Coefficient Model (a.k.a. multilevel model) (Adapted from UCLA Statistical Computing Seminars) School math achievement scores The data file consists of 7185 students
More informationLecture 11 Multiple Linear Regression
Lecture 11 Multiple Linear Regression STAT 512 Spring 2011 Background Reading KNNL: 6.1-6.5 11-1 Topic Overview Review: Multiple Linear Regression (MLR) Computer Science Case Study 11-2 Multiple Regression
More informationSection I. Define or explain the following terms (3 points each) 1. centered vs. uncentered 2 R - 2. Frisch theorem -
First Exam: Economics 388, Econometrics Spring 006 in R. Butler s class YOUR NAME: Section I (30 points) Questions 1-10 (3 points each) Section II (40 points) Questions 11-15 (10 points each) Section III
More informationST505/S697R: Fall Homework 2 Solution.
ST505/S69R: Fall 2012. Homework 2 Solution. 1. 1a; problem 1.22 Below is the summary information (edited) from the regression (using R output); code at end of solution as is code and output for SAS. a)
More informationOverview Scatter Plot Example
Overview Topic 22 - Linear Regression and Correlation STAT 5 Professor Bruce Craig Consider one population but two variables For each sampling unit observe X and Y Assume linear relationship between variables
More informationIn Class Review Exercises Vartanian: SW 540
In Class Review Exercises Vartanian: SW 540 1. Given the following output from an OLS model looking at income, what is the slope and intercept for those who are black and those who are not black? b SE
More informationEstimation and Centering
Estimation and Centering PSYED 3486 Feifei Ye University of Pittsburgh Main Topics Estimating the level-1 coefficients for a particular unit Reading: R&B, Chapter 3 (p85-94) Centering-Location of X Reading
More informationStatistics 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 informationLecture 11: Simple Linear Regression
Lecture 11: Simple Linear Regression Readings: Sections 3.1-3.3, 11.1-11.3 Apr 17, 2009 In linear regression, we examine the association between two quantitative variables. Number of beers that you drink
More informationCategorical Predictor Variables
Categorical Predictor Variables We often wish to use categorical (or qualitative) variables as covariates in a regression model. For binary variables (taking on only 2 values, e.g. sex), it is relatively
More informationFormula for the t-test
Formula for the t-test: How the t-test Relates to the Distribution of the Data for the Groups Formula for the t-test: Formula for the Standard Error of the Difference Between the Means Formula for the
More informationAnalysis of Variance. Source DF Squares Square F Value Pr > F. Model <.0001 Error Corrected Total
Math 221: Linear Regression and Prediction Intervals S. K. Hyde Chapter 23 (Moore, 5th Ed.) (Neter, Kutner, Nachsheim, and Wasserman) The Toluca Company manufactures refrigeration equipment as well as
More informationApplied Statistics and Econometrics
Applied Statistics and Econometrics Lecture 6 Saul Lach September 2017 Saul Lach () Applied Statistics and Econometrics September 2017 1 / 53 Outline of Lecture 6 1 Omitted variable bias (SW 6.1) 2 Multiple
More informationST Correlation and Regression
Chapter 5 ST 370 - Correlation and Regression Readings: Chapter 11.1-11.4, 11.7.2-11.8, Chapter 12.1-12.2 Recap: So far we ve learned: Why we want a random sample and how to achieve it (Sampling Scheme)
More informationCh 3: Multiple Linear Regression
Ch 3: Multiple Linear Regression 1. Multiple Linear Regression Model Multiple regression model has more than one regressor. For example, we have one response variable and two regressor variables: 1. delivery
More informationMultiple Regression Analysis. Part III. Multiple Regression Analysis
Part III Multiple Regression Analysis As of Sep 26, 2017 1 Multiple Regression Analysis Estimation Matrix form Goodness-of-Fit R-square Adjusted R-square Expected values of the OLS estimators Irrelevant
More informationST430 Exam 1 with Answers
ST430 Exam 1 with Answers Date: October 5, 2015 Name: Guideline: You may use one-page (front and back of a standard A4 paper) of notes. No laptop or textook are permitted but you may use a calculator.
More informationMultilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2
Multilevel Models in Matrix Form Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Today s Lecture Linear models from a matrix perspective An example of how to do
More informationMath 3330: Solution to midterm Exam
Math 3330: Solution to midterm Exam Question 1: (14 marks) Suppose the regression model is y i = β 0 + β 1 x i + ε i, i = 1,, n, where ε i are iid Normal distribution N(0, σ 2 ). a. (2 marks) Compute the
More informationSTAT763: Applied Regression Analysis. Multiple linear regression. 4.4 Hypothesis testing
STAT763: Applied Regression Analysis Multiple linear regression 4.4 Hypothesis testing Chunsheng Ma E-mail: cma@math.wichita.edu 4.4.1 Significance of regression Null hypothesis (Test whether all β j =
More informationSAS 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 informationMultivariate Regression (Chapter 10)
Multivariate Regression (Chapter 10) This week we ll cover multivariate regression and maybe a bit of canonical correlation. Today we ll mostly review univariate multivariate regression. With multivariate
More informationANALYSES OF NCGS DATA FOR ALCOHOL STATUS CATEGORIES 1 22:46 Sunday, March 2, 2003
ANALYSES OF NCGS DATA FOR ALCOHOL STATUS CATEGORIES 1 22:46 Sunday, March 2, 2003 The MEANS Procedure DRINKING STATUS=1 Analysis Variable : TRIGL N Mean Std Dev Minimum Maximum 164 151.6219512 95.3801744
More informationSTAT 350: Summer Semester Midterm 1: Solutions
Name: Student Number: STAT 350: Summer Semester 2008 Midterm 1: Solutions 9 June 2008 Instructor: Richard Lockhart Instructions: This is an open book test. You may use notes, text, other books and a calculator.
More informationChapter 12 - Lecture 2 Inferences about regression coefficient
Chapter 12 - Lecture 2 Inferences about regression coefficient April 19th, 2010 Facts about slope Test Statistic Confidence interval Hypothesis testing Test using ANOVA Table Facts about slope In previous
More informationNotation Survey. Paul E. Johnson 1 2 MLM 1 / Department of Political Science
MLM 1 / 52 Notation Survey Paul E. Johnson 1 2 1 Department of Political Science 2 Center for Research Methods and Data Analysis, University of Kansas 2015 MLM 2 / 52 Outline 1 Raudenbush and Bryk 2 Snijders
More informationMaster s Written Examination - Solution
Master s Written Examination - Solution Spring 204 Problem Stat 40 Suppose X and X 2 have the joint pdf f X,X 2 (x, x 2 ) = 2e (x +x 2 ), 0 < x < x 2
More informationStatistical Inference. Part IV. Statistical Inference
Part IV Statistical Inference As of Oct 5, 2017 Sampling Distributions of the OLS Estimator 1 Statistical Inference Sampling Distributions of the OLS Estimator Testing Against One-Sided Alternatives Two-Sided
More informationEconometrics I KS. Module 1: Bivariate Linear Regression. Alexander Ahammer. This version: March 12, 2018
Econometrics I KS Module 1: Bivariate Linear Regression Alexander Ahammer Department of Economics Johannes Kepler University of Linz This version: March 12, 2018 Alexander Ahammer (JKU) Module 1: Bivariate
More informationAnalysis of Covariance
Analysis of Covariance (ANCOVA) Bruce A Craig Department of Statistics Purdue University STAT 514 Topic 10 1 When to Use ANCOVA In experiment, there is a nuisance factor x that is 1 Correlated with y 2
More informationLinear models and their mathematical foundations: Simple linear regression
Linear models and their mathematical foundations: Simple linear regression Steffen Unkel Department of Medical Statistics University Medical Center Göttingen, Germany Winter term 2018/19 1/21 Introduction
More informationChapter 2: simple regression model
Chapter 2: simple regression model Goal: understand how to estimate and more importantly interpret the simple regression Reading: chapter 2 of the textbook Advice: this chapter is foundation of econometrics.
More informationAnswer Keys to Homework#10
Answer Keys to Homework#10 Problem 1 Use either restricted or unrestricted mixed models. Problem 2 (a) First, the respective means for the 8 level combinations are listed in the following table A B C Mean
More informationInference for Regression
Inference for Regression Section 9.4 Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Department of Mathematics University of Houston Lecture 13b - 3339 Cathy Poliak, Ph.D. cathy@math.uh.edu
More informationCOMPREHENSIVE WRITTEN EXAMINATION, PAPER III FRIDAY AUGUST 26, 2005, 9:00 A.M. 1:00 P.M. STATISTICS 174 QUESTION
COMPREHENSIVE WRITTEN EXAMINATION, PAPER III FRIDAY AUGUST 26, 2005, 9:00 A.M. 1:00 P.M. STATISTICS 174 QUESTION Answer all parts. Closed book, calculators allowed. It is important to show all working,
More informationStat 579: Generalized Linear Models and Extensions
Stat 579: Generalized Linear Models and Extensions Linear Mixed Models for Longitudinal Data Yan Lu April, 2018, week 15 1 / 38 Data structure t1 t2 tn i 1st subject y 11 y 12 y 1n1 Experimental 2nd subject
More informationHomework 2: Simple Linear Regression
STAT 4385 Applied Regression Analysis Homework : Simple Linear Regression (Simple Linear Regression) Thirty (n = 30) College graduates who have recently entered the job market. For each student, the CGPA
More informationSTAT 512 MidTerm I (2/21/2013) Spring 2013 INSTRUCTIONS
STAT 512 MidTerm I (2/21/2013) Spring 2013 Name: Key INSTRUCTIONS 1. This exam is open book/open notes. All papers (but no electronic devices except for calculators) are allowed. 2. There are 5 pages in
More informationCAS MA575 Linear Models
CAS MA575 Linear Models Boston University, Fall 2013 Midterm Exam (Correction) Instructor: Cedric Ginestet Date: 22 Oct 2013. Maximal Score: 200pts. Please Note: You will only be graded on work and answers
More informationF9 F10: Autocorrelation
F9 F10: Autocorrelation Feng Li Department of Statistics, Stockholm University Introduction In the classic regression model we assume cov(u i, u j x i, x k ) = E(u i, u j ) = 0 What if we break the assumption?
More informationStatistical Inference with Regression Analysis
Introductory Applied Econometrics EEP/IAS 118 Spring 2015 Steven Buck Lecture #13 Statistical Inference with Regression Analysis Next we turn to calculating confidence intervals and hypothesis testing
More informationRecent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data
Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data July 2012 Bangkok, Thailand Cosimo Beverelli (World Trade Organization) 1 Content a) Classical regression model b)
More informationECON3150/4150 Spring 2016
ECON3150/4150 Spring 2016 Lecture 6 Multiple regression model Siv-Elisabeth Skjelbred University of Oslo February 5th Last updated: February 3, 2016 1 / 49 Outline Multiple linear regression model and
More informationIntroduction to the Analysis of Hierarchical and Longitudinal Data
Introduction to the Analysis of Hierarchical and Longitudinal Data Georges Monette, York University with Ye Sun SPIDA June 7, 2004 1 Graphical overview of selected concepts Nature of hierarchical models
More informationHierarchical Generalized Linear Models. ERSH 8990 REMS Seminar on HLM Last Lecture!
Hierarchical Generalized Linear Models ERSH 8990 REMS Seminar on HLM Last Lecture! Hierarchical Generalized Linear Models Introduction to generalized models Models for binary outcomes Interpreting parameter
More informationSection 9c. Propensity scores. Controlling for bias & confounding in observational studies
Section 9c Propensity scores Controlling for bias & confounding in observational studies 1 Logistic regression and propensity scores Consider comparing an outcome in two treatment groups: A vs B. In a
More informationLecture 4 Multiple linear regression
Lecture 4 Multiple linear regression BIOST 515 January 15, 2004 Outline 1 Motivation for the multiple regression model Multiple regression in matrix notation Least squares estimation of model parameters
More informationTopic 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 informationdf=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 informationHomoskedasticity. Var (u X) = σ 2. (23)
Homoskedasticity How big is the difference between the OLS estimator and the true parameter? To answer this question, we make an additional assumption called homoskedasticity: Var (u X) = σ 2. (23) This
More informationSimple Regression Model Setup Estimation Inference Prediction. Model Diagnostic. Multiple Regression. Model Setup and Estimation.
Statistical Computation Math 475 Jimin Ding Department of Mathematics Washington University in St. Louis www.math.wustl.edu/ jmding/math475/index.html October 10, 2013 Ridge Part IV October 10, 2013 1
More informationLecture 10 Multiple Linear Regression
Lecture 10 Multiple Linear Regression STAT 512 Spring 2011 Background Reading KNNL: 6.1-6.5 10-1 Topic Overview Multiple Linear Regression Model 10-2 Data for Multiple Regression Y i is the response variable
More informationLecture 3 Linear random intercept models
Lecture 3 Linear random intercept models Example: Weight of Guinea Pigs Body weights of 48 pigs in 9 successive weeks of follow-up (Table 3.1 DLZ) The response is measures at n different times, or under
More informationSAS 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 informationIntroduction and Background to Multilevel Analysis
Introduction and Background to Multilevel Analysis Dr. J. Kyle Roberts Southern Methodist University Simmons School of Education and Human Development Department of Teaching and Learning Background and
More informationLecture 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 informationIntroduction 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 informationLinear Regression. In this problem sheet, we consider the problem of linear regression with p predictors and one intercept,
Linear Regression In this problem sheet, we consider the problem of linear regression with p predictors and one intercept, y = Xβ + ɛ, where y t = (y 1,..., y n ) is the column vector of target values,
More informationWeighted Least Squares
Weighted Least Squares The standard linear model assumes that Var(ε i ) = σ 2 for i = 1,..., n. As we have seen, however, there are instances where Var(Y X = x i ) = Var(ε i ) = σ2 w i. Here w 1,..., w
More informationChapter 2 Inferences in Simple Linear Regression
STAT 525 SPRING 2018 Chapter 2 Inferences in Simple Linear Regression Professor Min Zhang Testing for Linear Relationship Term β 1 X i defines linear relationship Will then test H 0 : β 1 = 0 Test requires
More informationDesigning Multilevel Models Using SPSS 11.5 Mixed Model. John Painter, Ph.D.
Designing Multilevel Models Using SPSS 11.5 Mixed Model John Painter, Ph.D. Jordan Institute for Families School of Social Work University of North Carolina at Chapel Hill 1 Creating Multilevel Models
More informationMultivariate Regression: Part I
Topic 1 Multivariate Regression: Part I ARE/ECN 240 A Graduate Econometrics Professor: Òscar Jordà Outline of this topic Statement of the objective: we want to explain the behavior of one variable as a
More informationMS&E 226: Small Data
MS&E 226: Small Data Lecture 15: Examples of hypothesis tests (v5) Ramesh Johari ramesh.johari@stanford.edu 1 / 32 The recipe 2 / 32 The hypothesis testing recipe In this lecture we repeatedly apply the
More informationMATH 644: Regression Analysis Methods
MATH 644: Regression Analysis Methods FINAL EXAM Fall, 2012 INSTRUCTIONS TO STUDENTS: 1. This test contains SIX questions. It comprises ELEVEN printed pages. 2. Answer ALL questions for a total of 100
More information