Longitudinal Studies. Cross-Sectional Studies. Example: Y i =(Y it1,y it2,...y i,tni ) T. Repeatedly measure individuals followed over time

Size: px
Start display at page:

Download "Longitudinal Studies. Cross-Sectional Studies. Example: Y i =(Y it1,y it2,...y i,tni ) T. Repeatedly measure individuals followed over time"

Transcription

1 Longitudinal Studies Cross-Sectional Studies Repeatedly measure individuals followed over time One observation on each subject Sometimes called panel studies (e.g. Economics, Sociology, Food Science) Different subjects are measured at different points in time (e.g. at different ages) Cannot entirely distinguish between cohort and age effects Reading ability example (DHLZ, pages 1-2) 455 Able to distinguish changes over time within individuals (age effects) from differences among individuals (cohort effects) Must account for correlations among measurements taken on the same individual Vector of measurements Y i =(Y it1,y it2,...y i,tni ) T on the ith subject, or experimental unit. 456 Example: Measure muscle strength of elderly subjects at 0, 6, and 12 months (Daniels and Hogan, 2000, Biometrics) Randomized clinical trial Investigate the effects of recombinant human growth hormone (rhgh) therapy for building and maintaining muscle strength in the elderly (Kiel et al, 1998). The trial enrolled 161 subjects and randomized them to one of four treatments: Placebo Growth hormone only (0.015 mg/kg rhgh) Both placebo and growth hormone were administered via daily injections Muscle strength measures were recorded at baseline, six months and twelve months. Strength is measured as the maximum foot-pounds of torque which can be exerted against resistance provided by a mechanical device Exercise plus placebo Exercise plus growth hormone

2 Measure Depression over time (Pourahmadi and Daniels, 2002 Biometrics) Patients were assigned active treatment and measured weekly for 16 weeks Weekly depression scores 549 subjects with no missing baseline covariates. Main questions of interest 1. Is a combined drug/psychotherapy treatment more effective than the only psychotherapy treatment in reducing depression? 2. Is initial severity an important predictor of patient improvement? 3. Do treatment and initial severity interact in their impact on the rate of improvement? 459 Current practices for treatment of major depression emphasizes symptom severity in determining the need for anti-depressant drugs. For these 549 patients, about 30% (2840) of the possible measurements were missing, mostly intermittently. beginitemize Several of the studies measured depression bi-weekly for part or all of the active phase of treatment so we have some observations missing by design. Some subjects dropped out (about 16%). Some were missing completely at random (MCAR) but others were related to side effects of treatment or being so depressed that they were provided an alternative treatment. 460 Classes of Models for Longitudinal Data Reduce the repeated measurements to a single value for each individual and perform a univariate analysis Marginal Models Consider a vector of observations, Y i = (Y i1,...,y ini ) T for i =1,...,m individuals (or experimental units) Expect observations taken on the same individual (experimental unit) to be correlated Marginal models Random effects (hierarchical) models Transition models 461 Consider a linear model for the conditional means, eg, E(Y ij )=β 0 + β 1 (x i )+β 2 t ij + β 3 t 2 ij Model the variances and covariances V i = Var Y i1 Y i2. Y i,ni = σ 2 1 σ 12 σ 1,ni σ 12 σ 2 2 σ 2,ni... σ ni,1 σ ni,2 σ 2 n i 462

3 Consider the model: Y i N(X i β, Σ i ) i = 1,2,...,m Assume independent responses from different individuals Y 1 Y 2. Y m N X 1 β X 2 β. X m β, V V V m The block diagonal covariance structure is important The covariance structure V i can differ across individuals Estimation in Marginal Models Good reference for likelihood estimation: Jennrich and Schluchter (1986) Biometrics Ordinary Least Squares: Minimize (Y Xβ) T (Y Xβ)= m (Y i X i β) T (Y i X i β) i=1 Set partial derivatives with respect to the elements of β equal to zero to obtain the estimating equations m i=1 XT i (Y i X i β)=0 The unique solution is ˆβ = (X T X) 1 X T Y Marginal models are used when inferences about β are of primary interest = m i=1 XT i X i 1 m i=1 XT i Y i 463 Maximum Likelihood Estimation: Generalized Least Squares: Minimize (Y Xβ) T Σ 1 (Y Xβ) = m i=1 (Y i X i β) T Vi 1 (Y i X i β) Set partial derivatives with respect to the elements of β equal to zero to obtain the estimating equations m i=1 XT i V i 1 (Y i X i β)=0 The unique solution is ˆβ = (X T Σ 1 X) 1 X T Σ 1 Y The natural logarithm of the multivariate Gaussian likelihood is log(l(β, Σ)) = 1 ( m 2 i=1 (2π) n i +log( V i )+(Y i X i β) T Vi 1 (Y i X i β) ) Set partial derivatives with respect to the elements of β equal to zero to obtain the estimating equations 1 m 2 i=1 XT i V i 1 (Y i X i β)=0 The unique solution is = m i=1 XT i V i 1 X i 1 m i=1 XT i V i 1 Y i 464 ˆβ = (X T Σ 1 X) 1 X T Σ 1 Y = m i=1 XT i V i 1 X i 1 m i=1 XT i V i 1 Y i 465

4 For given Σ, themleforβ is the generalized least squares estimator You can simultaneously obtain the maximum likelihood estimator ˆΣ for Σ If we plug in ˆβ for β and ˆΣ for Σ we obtain 2log(L(β, Σ)) = ( ) m i=1 (2π) n i T 1 +log( ˆV i )+(Y i X i β) ˆV i (Y i X i ˆβ) Likelihood ratio tests for comparing models Maximum likelihood estimates of variance components tend to be too small Restricted Maximum Likelihood Estimation (REML) Maximizing a Gaussian likelihood that does not depend on E(Y) = Xβ. Maximize a likelihood function for error contrasts linear combinations of observations that do not depend on Xβ will need a set of m n i rank(x) i=1 linearly independent error contrasts Gaussian model: Y N(Xβ,Σ) For a non-random matrix L LY N(L(Xβ,LΣL T ) Consequently, LY does not depend on Xβ if and only if LX =0. But LX =0if and only if L = M(I P X ) for some M with n = ( ) mi=1 n i rows, where P X = X(X T X) X T To avoid losing information we must have row rank(m) = n rank(x) = n p Then a set of n p error contrasts is r = M(I P X )Y N n p (0,M(I P X )Σ 1 (I P X )M T ) call this W, then rank(w )=n p and W 1 exists

5 For any M (n p) n withrowrankequalto The Restricted likelihood is L(Σ; r) = 1 (2π) (n p)/2 W 1/2e 1 2 rt W 1 r n p = n rank(x) the log-likelihood can be expressed in terms of e =(I X(XΣ 1 X T ) 1 X T Σ 1 )Y as The resulting log-likelihood is l(σ; e) = constant 1 2 log( Σ ) l(σ; r) = (n p) log(2π) log W 1 2 rt W 1 r 1 2 log( XT Σ 1 X ) 1 2 et Σ 1 e where X is any set of p =rank(x) linearly independent columns of X. Denote the resulting REML estimator as ˆΣ REML Selecting Covariance Structure Estimation of fixed effects: For any estimable function Cβ, the blue is the generalized least squares estimator Cb GLS = C(X T Σ 1 X) 1 X T Σ 1 Y An approximation is C ˆβ = C(X T ˆΣ 1 REML X) X T ˆΣ 1 REML Y and for large samples: C ˆβ N(Cβ,C(X T Σ 1 X) C T ) if you specified the correct model for Σ AIC: Akaike Information Criterion AIC=-2 loglik + 2*p (p is number of parameters) When n is large, often favors models with too many parameters (penalty does not change with sample size) In SAS, when specify ML, p is the number of fixed effects parameters plus the number of covariance parameters; when you specify REML, p is the number of covariance parameters AICC - continuity corrected version (see Burnham and Anderson, 1998)

6 BIC: Bayesian Information Criterion BIC= -2 loglik + p*log(n) (n is the number of subjects) based on approximation to the Bayes Factor In SAS, when you specify ML, p is the number of fixed effects parameters + number of covariance parameters; in REML, p is the number of covariance parameters In SAS,n is the number of subjects Bayesian Analysis: specify prior distributions for β (often either a Gaussian prior or a non-informative prior) and Σ (inverse Wishart prior); for other choices see Leonard, 1992 Annals; Brown, Le, and Zidek, 1994; Daniels and Kass, 1999 JASA; Barnard, Mc- Culloch, and Meng, 2000, Statistica Sinica Empirical Bayes: estimate hyperparameters of prior distributions from the data What if you Mis-Specify Σ? What if you assumed the wrong structure for Σ? Often assume some parametric structure for Σ Time series structures (AR, MA) Structured antedependence models (SAD), (Zimmerman and Nunez- Anton, 1997) Compound Symmetry Likelihood is a function of fewer paramters L(β, Σ(α)) Often get an estimator for β that is consistent has a large sample normal distribution is not quite efficient A consistent estimator of the large sample covariance matrix for the estimator of β is obtained from a sandwich variance estimator More stable estimator for Σ (fewer parameters) and subsequently, a more stable estimator for β

7 Shrinkage Estimators Chen, 1979; Daniels and Kass (1999, 2001 Biometrics); Daniels and Pourahmadi (2001) Strategy: The default in PROC MIXED in SAS is to take Var(Y )=σ 2 e I You can change this by using the REPEATED statement in PROC MIXED Shrink toward the structure Data determines the amount of shrinkage Many different parameterizations on which to shrink Properties: Consistent Asymptotic normality Asymptotic efficiency 478 REPEATED / type = subject = subj (program) r print the R matrix for one subject variables in the class statement rcorr; print the correlation martix for one subject 479 Compound Symmetry: (type = CS) R = σ σ2 2 σ 2 2 σ 2 2 σ 2 2 σ 2 2 σ σ2 2 σ 2 2 σ 2 2 σ 2 2 σ 2 2 σ σ2 2 σ 2 2 σ 2 2 σ 2 2 σ 2 2 σ σ2 2 Unstructured: (type = UN) R = σ 2 1 σ 12 σ 13 σ 14 σ 12 σ 2 2 σ 23 σ 24 σ 13 σ 23 σ 2 3 σ 34 σ 14 σ 24 σ 34 σ 2 4 Variance components: (type = VC) (default) R = σ σ σ σ 2 4 Toeplitz: (type = TOEP) R = σ 2 σ 1 σ 2 σ 3 σ 1 σ 2 σ 1 σ 2 σ 2 σ 1 σ 2 σ 1 σ 3 σ 2 σ 1 σ

8 Heterogeneous Toeplitz: (type = TOEPH) R = σ 2 1 σ 1 σ 2 ρ 1 σ 1 σ 2 ρ 2 σ 1 σ 4 ρ 3 σ 2 σ 1 ρ 1 σ 2 2 σ 2 σ 3 ρ 1 σ 2 σ 4 ρ 2 σ 3 σ 1 ρ 2 σ 3 σ 2 ρ 1 σ 2 3 σ 3 σ 4 ρ 1 σ 4 σ 1 ρ 3 σ 4 σ 2 ρ 2 σ 4 σ 3 ρ 1 σ 2 4 First Order Autoregressive: (type = AR(1)) R = σ 2 1 ρ ρ 2 ρ 3 ρ 1 ρ ρ 2 ρ 2 ρ 1 ρ ρ 3 ρ 2 ρ 1 First order Ante-dependence: (type = ANTE(1)) R = σ 2 1 σ 1 σ 2 ρ 1 σ 1 σ 3 ρ 1 ρ 2 σ 2 σ 1 ρ 1 σ 2 2 σ 2 σ 3 ρ 2 σ 3 σ 1 ρ 2 ρ 1 σ 3 σ 2 ρ 2 σ 2 3 Heterogeneous AR(1): (type = ARH(1)) R = σ 2 1 σ 1 σ 2 ρ σ 1 σ 3 ρ 2 σ 1 σ 4 ρ 3 σ 2 σ 1 ρ σ 2 2 σ 2 σ 3 ρ σ 2 σ 4 ρ 2 σ 3 σ 1 ρ 2 σ 3 σ 2 ρ σ 2 3 σ 3 σ 4 ρ σ 4 σ 1 ρ 3 σ 4 σ 2 ρ 2 σ 4 σ 3 ρ σ Fitting Marginal Models in SAS and Splus Spatial power: (type = sp(pow)(list)) list of variables defining coordinates R = σ 2 1 ρ d 12 ρ d 13 ρ d 14 ρ d 12 1 ρ d 23 ρ d 24 ρ d 13 ρ d 23 1 ρ d 34 ρ d 14 ρ d 24 ρ d 34 1 where d ij is the Euclidean distance between the i-th and j-th observations provided by one subject (or unit). You can replace pow with a number of other choices. SAS: the MIXED procedure /* Enter the cow protein data */ data set2; infile c:\st565\dhlz.example1_4.data ; input diet cow week protein; proc sort data=set2; by diet week; proc means data=set2 noprint; by diet week; var protein; output out=means mean=pmean; proc print data=means; axis1 label=(f=swiss h=1.8 a=90 r=0 "Protein (percent)") order = 2.5 to 4.5 by 0.5 value=(f=swiss h=1.8) w=3.0 length= 4.0in; axis2 label=(f=swiss h=2.0 "Time(weeks)") order = 0 to 20 by 5 value=(f=swiss h=1.8) w= 3.0 length = 6.5 in;

9 SYMBOL1 V=CIRCLE H=1.7 w=3 l=1 i=join ; SYMBOL2 V=DIAMOND H=1.7 w=3 l=3 i=join ; SYMBOL3 V=square H=1.7 w=3 l=9 i=join ; PROC GPLOT DATA=means; PLOT pmean*week=diet / vaxis=axis1 haxis=axis2; TITLE1 ls=0.01in H=2.0 F=swiss "Protein Content in Milk"; footnote ls=0.01in; RUN; /* perform a one-way anova at each time point */ proc sort data=set2; by week diet; proc glm data=set2; by week; class diet; model protein = diet / ss1 ss3; lsmeans diet / stderr pdiff; week= Dependent Variable: protein The GLM Procedure Sum of Source DF Squares Mean Square F Value Pr > F Model Error Corrected Total week= Dependent Variable: protein The GLM Procedure Sum of Source DF Squares Mean Square F Value Pr>F Model Error Corrected Total protein Standard LSMEAN diet LSMEAN Error Pr > t Number < < < Least Squares Means for effect diet Pr > t for H0: LSMean(i)=LSMean(j) Dependent Variable: protein i/j NOTE: To ensure overall protection level, only probabilities associated with pre-planned comparisons should be used. 488 The GLM Procedure Least Squares Means protein Standard LSMEAN diet LSMEAN Error Pr > t Number < < < Least Squares Means for effect diet Pr > t for H0: LSMean(i)=LSMean(j) Dependent Variable: protein i/j NOTE: To ensure overall protection level, only probabilities associated with pre-planned comparisons should be used. 489

10 The Mixed Procedure Model Information Data Set Dependent Variable Covariance Structure Subject Effect Estimation Method Residual Variance Method Fixed Effects SE Method Degrees of Freedom Method WORK.SET2 protein Compound Symmetry cow(diet) REML Profile Model-Based Between-Within /* Fit cubic trends across time with a compound symmetry covariance structure */ proc mixed data=set2; class diet cow; model protein = diet diet*week diet*week*week diet*week*week*week / noint s htype=1 outpm=means; repeated / type=cs sub=cow(diet); Class Level Information Class Levels Values diet cow Iteration History Iteration Evaluations -2 Res Log Like Criterion Convergence criteria met. Covariance Parameter Estimates Cov Parm Subject Estimate CS cow(diet) Residual Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq <.0001 Solution for Fixed Effects Standard Effect diet Estimate Error DF t Value Pr > t diet <.0001 diet <.0001 diet <.0001 week*diet <.0001 week*diet <.0001 week*diet <.0001 week*w*diet <.0001 week*w*diet <.0001 week*w*diet <.0001 week*w*w*diet <.0001 week*w*w*diet <.0001 week*w*w*diet < /* Fit cubic trends across time with a general (unstructured) covariance structure */ proc mixed data=set2; class diet cow; model protein = diet diet*week diet*week*week diet*week*week*week / noint s htype=1 outpm=means; repeated / type=un sub=cow(diet); 493

11 Iteration History Iteration Evaluations -2 Res Log Like Criterion Convergence criteria met. Fit Statistics -2 Res Log Likelihood AIC (smaller is better) 41.4 AICC (smaller is better) BIC (smaller is better) The Mixed Procedure Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq <.0001 Solution for Fixed Effects Standard Effect diet Estimate Error DF t Value Covariance Parameter Estimates Cov Parm Subject Estimate UN(1,1) cow(diet) UN(2,1) cow(diet) UN(2,2) cow(diet) UN(3,1) cow(diet) UN(19,16) cow(diet) UN(19,17) cow(diet) UN(19,18) cow(diet) UN(19,19) cow(diet) diet diet diet week*diet week*diet week*diet week*week*diet week*week*diet week*week*diet week*week*week*diet week*week*week*diet week*week*week*diet The Mixed Procedure Type 1 Tests of Fixed Effects /* To test for diet effects fit another form of the same model */ Num Den Effect DF DF F Value Pr > F diet <.0001 week*diet week*week*diet <.0001 week*week*week*diet <.0001 proc mixed data=set2; class diet cow; model protein = diet week diet*week week*week diet*week*week week*week*week diet*week*week*week / s htype=3 outpm=means; repeated / type=un sub=cow(diet);

12 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) 41.4 AICC (smaller is better) BIC (smaller is better) Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq <.0001 Solution for Fixed Effects Standard Effect diet Estimate Error DF t Value Intercept diet diet diet week week*diet week*diet week*diet week*week week*week*diet week*week*diet week*week*diet week*week*week week*week*week*diet week*week*week*diet week*week*week*diet /* To test for diet effects fit another form of the same model */ Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F diet week <.0001 week*diet week*week <.0001 week*week*diet week*week*week <.0001 week*week*week*diet proc mixed data=set2; class diet cow; model protein = diet week diet*week week*week diet*week*week week*week*week diet*week*week*week / s htype=3 outpm=means; repeated / type=un sub=cow(diet); /* plot the fitted curves */ axis1 label=(f=swiss h=1.8 a=90 r=0 "Protein (percent)") order = 2.5 to 4.5 by.5 value=(f=swiss h=1.8) w=3.0 length= 4.0in; axis2 label=(f=swiss h=2.0 "Time(weeks)") order = 0 to 20 by 5 value=(f=swiss h=1.8) w= 3.0 length = 6.5 in;

13 SYMBOL1 V=CIRCLE H=1.7 w=3 l=1 i=join ; SYMBOL2 V=DIAMOND H=1.7 w=3 l=3 i=join ; SYMBOL3 V=square H=1.7 w=3 l=9 i=join ; PROC GPLOT DATA=means; PLOT pred*week=diet / vaxis=axis1 haxis=axis2; TITLE1 ls=0.01in H=2.0 F=swiss "Estimated Protein Content"; footnote ls=0.01in; RUN; Solution for Fixed Effects Standard Effect diet Estimate Error DF t Value /* To test for diet effects fit another form of the same model */ proc mixed data=set2; class diet cow; model protein = diet week diet*week week*week diet*week*week week*week*week diet*week*week*week / s htype=3 outpm=means df=kr; repeated / type=un sub=cow(diet); Fit Statistics -2 Res Log Likelihood AIC (smaller is better) 41.4 AICC (smaller is better) BIC (smaller is better) Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq <.0001 Intercept diet diet diet week week*diet week*diet week*diet week*week week*week*diet week*week*diet week*week*diet week*week*week week*week*week*diet week*week*week*diet week*week*week*diet Effect diet Pr > t Intercept <.0001 diet diet diet 3. week <.0001 week*diet week*diet week*diet 3. week*week week*week*diet week*week*diet week*week*diet 3. week*week*week week*week*week*diet week*week*week*diet week*week*week*diet

14 # This file posted as milkprotein.ssc # # This code is applied to the milk protein # data from DHLZ, page 8. Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F diet week <.0001 week*diet week*week <.0001 week*week*diet week*week*week <.0001 week*week*week*diet set1 <- read.table("c:/mydocuments/courses/st565/data/dhlz.example1_4.data", col.names=c("diet","cow","week","protein")) set1 # Create factors set1$dietf <- as.factor(set1$diet) set1$weekf <- as.factor(set1$week) set1$cowf <- as.factor(set1$cow) # Sort the data set by subject i <- order(set1$cow,set1$week) set1 <- set1[i,] # Delete the list called i rm(i) # Compute sample means Observed Protein Means means <- tapply(set1$protein, list(set1$week,set1$diet),mean) means # Make a profile plot of the means # Unix users should insert the motif( ) # command x.axis <- unique(set1$week) par(fin=c(6.0,6.0),pch=18,mkh=.1,mex=1.5, cex=1.2,lwd=3) matplot(c(1,19), c(3.0,4.0), type="n", xlab="time(weeks)", ylab="protein (percent)", main= "Observed Protein Means") matlines(x.axis,means,type= l,lty=c(1,3,7)) matpoints(x.axis,means, pch=c(16,17,15)) legend(1,2.45,legend=c("barley diet", Barley+lupins, Lupin diet ),lty=c(1,3,7),bty= n ) Protein (percent) Time(weeks) Barley diet Barley+lupins Lupin diet

15 AIC BIC loglik # Use the gls( ) function to fit a # model where the errors have a # compound symmetry covariance structure # within cows. options(contrasts=c("contr.treatment","contr.poly")) set1.glscs <- gls(protein ~ dietf+ week+ dietf*week+week^2+dietf*week^2 + week^3 + dietf*week^3, data=set1, correlation = corcompsymm(form=~1 cow), method=c("reml")) summary(set1.glscs) anova(set1.glscs) Correlation Structure: Compound symmetry Formula: ~ 1 cow Parameter estimate(s): Rho Coefficients: Value Std.Error t-value p-value (Intercept) <.0001 dietf dietf week <.0001 I(week^2) <.0001 I(week^3) <.0001 dietf2week dietf3week dietf2i(week^2) dietf3i(week^2) dietf2i(week^3) dietf3i(week^3) Standardized residuals: Min Q1 Med Q3 Max Residual standard error: Degrees of freedom: 1337 total; 1325 residual Denom. DF: 1325 numdf F-value p-value (Intercept) <.0001 dietf week <.0001 I(week^2) <.0001 I(week^3) <.0001 dietf:week dietf:i(week^2) dietf:i(week^3) # Try an auto regressive covariance # structures across weeks within cows set1.glsar <- gls(protein ~ dietf+ week+ dietf*week+week^2+dietf*week^2 + week^3 + dietf*week^3, data=set1, correlation = corar1(form=~1 cow), method=c("reml")) summary(set1.glsar) anova(set1.glsar)

16 Generalized least squares fit by REML Model: protein ~ dietf + week + dietf * week + week^2 + dietf * week^2 + week^3 + dietf * week^3 Data: set1 AIC BIC loglik Correlation Structure: AR(1) Formula: ~ 1 cow Parameter estimate(s): Phi Coefficients: Value Std.Error t-value p-value (Intercept) <.0001 dietf dietf week <.0001 I(week^2) <.0001 I(week^3) dietf2week dietf3week dietf2i(week^2) dietf3i(week^2) dietf2i(week^3) dietf3i(week^3) Standardized residuals: Min Q1 Med Q3 Max Residual standard error: Degrees of freedom: 1337 total; 1325 residual Denom. DF: 1325 numdf F-value p-value (Intercept) <.0001 dietf <.0001 week <.0001 I(week^2) <.0001 I(week^3) <.0001 dietf:week dietf:i(week^2) dietf:i(week^3) # Try a general correlation structure set1.glss <- gls(protein ~ dietf + week+ dietf*week +week^2+dietf*week^2 + week^3 + dietf*week^3, data=set1, correlation = corsymm(form=~1 cow), weights = varident(form = ~1 weekf), method=c("reml")) summary(set1.glss) anova(set1.glss) # Try an AR(1) correlation structure # with hterogeneous variances set1.glss <- gls(protein ~ dietf + week+ dietf*week +week^2+dietf*week^2 + week^3 + dietf*week^3, data=set1, correlation = corar1(form=~1 cow), weights = varident(form = ~ 1 week), method=c("reml")) summary(set1.glsarh) anova(set1.glss) # Compare the fit of various covariance # structures. anova(set1.glss, set1.glscs) anova(set1.glss, set1.glsar) anova(set1.glss, set1.glsar, set1.glsarh) # To compare the continuous week model to the # model where we fit a different mean at each # time point, we must compare likelihood values # instead of REML likelihood values. set1.glsarmle <- gls(protein ~ dietf+ weekf+dietf*weekf, data=set1, correlation = corar1(form=~1 cow), method=c("ml")) set1.glscarmle <- gls(protein ~ dietf+ week+ dietf*week + week^2 + dietf*week^2 + week^3 + dietf*week^3, data=set1, correlation = corar1(form=~1 cow), method=c("ml"))

17 corstruct functions anova(set1.glsarmle,set1.glscarmle) Model df AIC BIC loglik set1.glsarmle set1.glscarmle vs <.0001 Test L.Ratio p-value set1.glsarmle set1.glacarmle 1 vs <.0001 corcompsymm compound symmetry corsym general corar1 autoregressive of order 1 corcar1 continous time AR(1) corarm A autoregressive-moving average corexp exponential 1 exp( s/ρ) corgaus expgaus 1 exp[ (s/ρ) 2 ] corlin linear 1 (1 s/ρ)i(s <ρ) corratio rational quadratic (s/ρ) 2 /[1 + (s/ρ) 2 ] corspher spherical 1 [1 1.5(s/ρ) +0.5(sρ) 3 ]I(s <ρ)

These slides illustrate a few example R commands that can be useful for the analysis of repeated measures data.

These slides illustrate a few example R commands that can be useful for the analysis of repeated measures data. These slides illustrate a few example R commands that can be useful for the analysis of repeated measures data. We focus on the experiment designed to compare the effectiveness of three strength training

More information

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

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

More information

Repeated Measures Data

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

More information

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

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

More information

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

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

More information

ANOVA Longitudinal Models for the Practice Effects Data: via GLM

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

More information

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

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

More information

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

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

More information

Covariance Structure Approach to Within-Cases

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

More information

Repeated Measures Modeling With PROC MIXED E. Barry Moser, Louisiana State University, Baton Rouge, LA

Repeated Measures Modeling With PROC MIXED E. Barry Moser, Louisiana State University, Baton Rouge, LA Paper 188-29 Repeated Measures Modeling With PROC MIXED E. Barry Moser, Louisiana State University, Baton Rouge, LA ABSTRACT PROC MIXED provides a very flexible environment in which to model many types

More information

SAS Syntax and Output for Data Manipulation:

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

More information

STAT 5200 Handout #23. Repeated Measures Example (Ch. 16)

STAT 5200 Handout #23. Repeated Measures Example (Ch. 16) Motivating Example: Glucose STAT 500 Handout #3 Repeated Measures Example (Ch. 16) An experiment is conducted to evaluate the effects of three diets on the serum glucose levels of human subjects. Twelve

More information

Topic 20: Single Factor Analysis of Variance

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

More information

Models for longitudinal data

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

More information

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

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

More information

Introduction to SAS proc mixed

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

More information

Answer to exercise: Blood pressure lowering drugs

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

More information

Describing Within-Person Fluctuation over Time using Alternative Covariance Structures

Describing Within-Person Fluctuation over Time using Alternative Covariance Structures Describing Within-Person Fluctuation over Time using Alternative Covariance Structures Today s Class: The Big Picture ACS models using the R matrix only Introducing the G, Z, and V matrices ACS models

More information

Advantages of Mixed-effects Regression Models (MRM; aka multilevel, hierarchical linear, linear mixed models) 1. MRM explicitly models individual

Advantages of Mixed-effects Regression Models (MRM; aka multilevel, hierarchical linear, linear mixed models) 1. MRM explicitly models individual Advantages of Mixed-effects Regression Models (MRM; aka multilevel, hierarchical linear, linear mixed models) 1. MRM explicitly models individual change across time 2. MRM more flexible in terms of repeated

More information

Introduction to SAS proc mixed

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

More information

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

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

More information

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

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

More information

Repeated measures, part 2, advanced methods

Repeated measures, part 2, advanced methods enote 12 1 enote 12 Repeated measures, part 2, advanced methods enote 12 INDHOLD 2 Indhold 12 Repeated measures, part 2, advanced methods 1 12.1 Intro......................................... 3 12.2 A

More information

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

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

More information

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

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

More information

Modelling the Covariance

Modelling the Covariance Modelling the Covariance Jamie Monogan Washington University in St Louis February 9, 2010 Jamie Monogan (WUStL) Modelling the Covariance February 9, 2010 1 / 13 Objectives By the end of this meeting, participants

More information

Odor attraction CRD Page 1

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

More information

Covariance Models (*) X i : (n i p) design matrix for fixed effects β : (p 1) regression coefficient for fixed effects

Covariance Models (*) X i : (n i p) design matrix for fixed effects β : (p 1) regression coefficient for fixed effects Covariance Models (*) Mixed Models Laird & Ware (1982) Y i = X i β + Z i b i + e i Y i : (n i 1) response vector X i : (n i p) design matrix for fixed effects β : (p 1) regression coefficient for fixed

More information

Biostatistics Workshop Longitudinal Data Analysis. Session 4 GARRETT FITZMAURICE

Biostatistics Workshop Longitudinal Data Analysis. Session 4 GARRETT FITZMAURICE Biostatistics Workshop 2008 Longitudinal Data Analysis Session 4 GARRETT FITZMAURICE Harvard University 1 LINEAR MIXED EFFECTS MODELS Motivating Example: Influence of Menarche on Changes in Body Fat Prospective

More information

Overview. 1. Independence. 2. Modeling Autocorrelation. 3. Temporal Autocorrelation Example. 4. Spatial Autocorrelation Example

Overview. 1. Independence. 2. Modeling Autocorrelation. 3. Temporal Autocorrelation Example. 4. Spatial Autocorrelation Example 6. Autocorrelation Overview 1. Independence 2. Modeling Autocorrelation 3. Temporal Autocorrelation Example 4. Spatial Autocorrelation Example 6.1 Independence 6.1 Independence. Model assumptions All linear

More information

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

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

More information

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

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

More information

Introduction to General and Generalized Linear Models

Introduction to General and Generalized Linear Models Introduction to General and Generalized Linear Models Mixed effects models - II Henrik Madsen, Jan Kloppenborg Møller, Anders Nielsen April 16, 2012 H. Madsen, JK. Møller, A. Nielsen () Chapman & Hall

More information

WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS

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

More information

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

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

More information

Introduction to Within-Person Analysis and RM ANOVA

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

More information

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

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

More information

20. REML Estimation of Variance Components. Copyright c 2018 (Iowa State University) 20. Statistics / 36

20. REML Estimation of Variance Components. Copyright c 2018 (Iowa State University) 20. Statistics / 36 20. REML Estimation of Variance Components Copyright c 2018 (Iowa State University) 20. Statistics 510 1 / 36 Consider the General Linear Model y = Xβ + ɛ, where ɛ N(0, Σ) and Σ is an n n positive definite

More information

Repeated Measures Design. Advertising Sales Example

Repeated Measures Design. Advertising Sales Example STAT:5201 Anaylsis/Applied Statistic II Repeated Measures Design Advertising Sales Example A company is interested in comparing the success of two different advertising campaigns. It has 10 test markets,

More information

Stat 579: Generalized Linear Models and Extensions

Stat 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 information

Stat 579: Generalized Linear Models and Extensions

Stat 579: Generalized Linear Models and Extensions Stat 579: Generalized Linear Models and Extensions Linear Mixed Models for Longitudinal Data Yan Lu April, 2018, week 14 1 / 64 Data structure and Model t1 t2 tn i 1st subject y 11 y 12 y 1n1 2nd subject

More information

Topic 23: Diagnostics and Remedies

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

More information

Chapter 9. Multivariate and Within-cases Analysis. 9.1 Multivariate Analysis of Variance

Chapter 9. Multivariate and Within-cases Analysis. 9.1 Multivariate Analysis of Variance Chapter 9 Multivariate and Within-cases Analysis 9.1 Multivariate Analysis of Variance Multivariate means more than one response variable at once. Why do it? Primarily because if you do parallel analyses

More information

Lecture 4. Random Effects in Completely Randomized Design

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

More information

Modeling the Covariance

Modeling the Covariance Modeling the Covariance Jamie Monogan University of Georgia February 3, 2016 Jamie Monogan (UGA) Modeling the Covariance February 3, 2016 1 / 16 Objectives By the end of this meeting, participants should

More information

STAT3401: Advanced data analysis Week 10: Models for Clustered Longitudinal Data

STAT3401: Advanced data analysis Week 10: Models for Clustered Longitudinal Data STAT3401: Advanced data analysis Week 10: Models for Clustered Longitudinal Data Berwin Turlach School of Mathematics and Statistics Berwin.Turlach@gmail.com The University of Western Australia Models

More information

International Journal of Current Research in Biosciences and Plant Biology ISSN: Volume 2 Number 5 (May-2015) pp

International Journal of Current Research in Biosciences and Plant Biology ISSN: Volume 2 Number 5 (May-2015) pp Original Research Article International Journal of Current Research in Biosciences and Plant Biology ISSN: 349-00 Volume Number (May-01) pp. -19 www.ijcrbp.com Graphical Approaches to Support Mixed Model

More information

Random Intercept Models

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

More information

R Output for Linear Models using functions lm(), gls() & glm()

R Output for Linear Models using functions lm(), gls() & glm() LM 04 lm(), gls() &glm() 1 R Output for Linear Models using functions lm(), gls() & glm() Different kinds of output related to linear models can be obtained in R using function lm() {stats} in the base

More information

POWER ANALYSIS TO DETERMINE THE IMPORTANCE OF COVARIANCE STRUCTURE CHOICE IN MIXED MODEL REPEATED MEASURES ANOVA

POWER ANALYSIS TO DETERMINE THE IMPORTANCE OF COVARIANCE STRUCTURE CHOICE IN MIXED MODEL REPEATED MEASURES ANOVA POWER ANALYSIS TO DETERMINE THE IMPORTANCE OF COVARIANCE STRUCTURE CHOICE IN MIXED MODEL REPEATED MEASURES ANOVA A Thesis Submitted to the Graduate Faculty of the North Dakota State University of Agriculture

More information

STAT 705 Generalized linear mixed models

STAT 705 Generalized linear mixed models STAT 705 Generalized linear mixed models Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 24 Generalized Linear Mixed Models We have considered random

More information

Biostatistics 301A. Repeated measurement analysis (mixed models)

Biostatistics 301A. Repeated measurement analysis (mixed models) B a s i c S t a t i s t i c s F o r D o c t o r s Singapore Med J 2004 Vol 45(10) : 456 CME Article Biostatistics 301A. Repeated measurement analysis (mixed models) Y H Chan Faculty of Medicine National

More information

Models for binary data

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

More information

Serial Correlation. Edps/Psych/Stat 587. Carolyn J. Anderson. Fall Department of Educational Psychology

Serial 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 information

1 Mixed effect models and longitudinal data analysis

1 Mixed effect models and longitudinal data analysis 1 Mixed effect models and longitudinal data analysis Mixed effects models provide a flexible approach to any situation where data have a grouping structure which introduces some kind of correlation between

More information

Two-factor studies. STAT 525 Chapter 19 and 20. Professor Olga Vitek

Two-factor studies. STAT 525 Chapter 19 and 20. Professor Olga Vitek Two-factor studies STAT 525 Chapter 19 and 20 Professor Olga Vitek December 2, 2010 19 Overview Now have two factors (A and B) Suppose each factor has two levels Could analyze as one factor with 4 levels

More information

Variance component models part I

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

More information

Mixed effects models

Mixed effects models Mixed effects models The basic theory and application in R Mitchel van Loon Research Paper Business Analytics Mixed effects models The basic theory and application in R Author: Mitchel van Loon Research

More information

Intruction to General and Generalized Linear Models

Intruction to General and Generalized Linear Models Intruction to General and Generalized Linear Models Mixed Effects Models IV Henrik Madsen Anna Helga Jónsdóttir hm@imm.dtu.dk April 30, 2012 Henrik Madsen Anna Helga Jónsdóttir (hm@imm.dtu.dk) Intruction

More information

Topic 32: Two-Way Mixed Effects Model

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

More information

Dynamic Determination of Mixed Model Covariance Structures. in Double-blind Clinical Trials. Matthew Davis - Omnicare Clinical Research

Dynamic Determination of Mixed Model Covariance Structures. in Double-blind Clinical Trials. Matthew Davis - Omnicare Clinical Research PharmaSUG2010 - Paper SP12 Dynamic Determination of Mixed Model Covariance Structures in Double-blind Clinical Trials Matthew Davis - Omnicare Clinical Research Abstract With the computing power of SAS

More information

Analysis of Repeated Measures Data of Iraqi Awassi Lambs Using Mixed Model

Analysis of Repeated Measures Data of Iraqi Awassi Lambs Using Mixed Model American Journal of Applied Scientific Research 01; 1(): 1-6 Published online November 1, 01 (http://www.sciencepublishinggroup.com/j/ajasr) doi: 10.64/j.ajasr.00.13 Analysis of Repeated Measures Data

More information

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

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

More information

Lecture 9 STK3100/4100

Lecture 9 STK3100/4100 Lecture 9 STK3100/4100 27. October 2014 Plan for lecture: 1. Linear mixed models cont. Models accounting for time dependencies (Ch. 6.1) 2. Generalized linear mixed models (GLMM, Ch. 13.1-13.3) Examples

More information

Introduction to Random Effects of Time and Model Estimation

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

More information

Workshop 9.3a: Randomized block designs

Workshop 9.3a: Randomized block designs -1- Workshop 93a: Randomized block designs Murray Logan November 23, 16 Table of contents 1 Randomized Block (RCB) designs 1 2 Worked Examples 12 1 Randomized Block (RCB) designs 11 RCB design Simple Randomized

More information

Model Estimation Example

Model Estimation Example Ronald H. Heck 1 EDEP 606: Multivariate Methods (S2013) April 7, 2013 Model Estimation Example As we have moved through the course this semester, we have encountered the concept of model estimation. Discussions

More information

Analyzing the Behavior of Rats by Repeated Measurements

Analyzing the Behavior of Rats by Repeated Measurements Georgia State University ScholarWorks @ Georgia State University Mathematics Theses Department of Mathematics and Statistics 5-3-007 Analyzing the Behavior of Rats by Repeated Measurements Kenita A. Hall

More information

Introduction and Background to Multilevel Analysis

Introduction 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 information

Analysis of variance and regression. May 13, 2008

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

More information

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

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

More information

Classification. Chapter Introduction. 6.2 The Bayes classifier

Classification. Chapter Introduction. 6.2 The Bayes classifier Chapter 6 Classification 6.1 Introduction Often encountered in applications is the situation where the response variable Y takes values in a finite set of labels. For example, the response Y could encode

More information

Multilevel 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 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 information

Review of Unconditional Multilevel Models for Longitudinal Data

Review of Unconditional Multilevel Models for Longitudinal Data Review of Unconditional Multilevel Models for Longitudinal Data Topics: Course (and MLM) overview Concepts in longitudinal multilevel modeling Model comparisons and significance testing Describing within-person

More information

CHL 5225 H Crossover Trials. CHL 5225 H Crossover Trials

CHL 5225 H Crossover Trials. CHL 5225 H Crossover Trials CHL 55 H Crossover Trials The Two-sequence, Two-Treatment, Two-period Crossover Trial Definition A trial in which patients are randomly allocated to one of two sequences of treatments (either 1 then, or

More information

Some general observations.

Some general observations. Modeling and analyzing data from computer experiments. Some general observations. 1. For simplicity, I assume that all factors (inputs) x1, x2,, xd are quantitative. 2. Because the code always produces

More information

UNIVERSITY OF MASSACHUSETTS Department of Mathematics and Statistics Applied Statistics Friday, January 15, 2016

UNIVERSITY OF MASSACHUSETTS Department of Mathematics and Statistics Applied Statistics Friday, January 15, 2016 UNIVERSITY OF MASSACHUSETTS Department of Mathematics and Statistics Applied Statistics Friday, January 15, 2016 Work all problems. 60 points are needed to pass at the Masters Level and 75 to pass at the

More information

Outline. Linear OLS Models vs: Linear Marginal Models Linear Conditional Models. Random Intercepts Random Intercepts & Slopes

Outline. Linear OLS Models vs: Linear Marginal Models Linear Conditional Models. Random Intercepts Random Intercepts & Slopes Lecture 2.1 Basic Linear LDA 1 Outline Linear OLS Models vs: Linear Marginal Models Linear Conditional Models Random Intercepts Random Intercepts & Slopes Cond l & Marginal Connections Empirical Bayes

More information

Restricted Maximum Likelihood in Linear Regression and Linear Mixed-Effects Model

Restricted Maximum Likelihood in Linear Regression and Linear Mixed-Effects Model Restricted Maximum Likelihood in Linear Regression and Linear Mixed-Effects Model Xiuming Zhang zhangxiuming@u.nus.edu A*STAR-NUS Clinical Imaging Research Center October, 015 Summary This report derives

More information

Statistical Inference: The Marginal Model

Statistical 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 information

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

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

More information

BIOS 2083 Linear Models c Abdus S. Wahed

BIOS 2083 Linear Models c Abdus S. Wahed Chapter 5 206 Chapter 6 General Linear Model: Statistical Inference 6.1 Introduction So far we have discussed formulation of linear models (Chapter 1), estimability of parameters in a linear model (Chapter

More information

STAT 526 Advanced Statistical Methodology

STAT 526 Advanced Statistical Methodology STAT 526 Advanced Statistical Methodology Fall 2017 Lecture Note 10 Analyzing Clustered/Repeated Categorical Data 0-0 Outline Clustered/Repeated Categorical Data Generalized Linear Mixed Models Generalized

More information

RANDOM and REPEATED statements - How to Use Them to Model the Covariance Structure in Proc Mixed. Charlie Liu, Dachuang Cao, Peiqi Chen, Tony Zagar

RANDOM and REPEATED statements - How to Use Them to Model the Covariance Structure in Proc Mixed. Charlie Liu, Dachuang Cao, Peiqi Chen, Tony Zagar Paper S02-2007 RANDOM and REPEATED statements - How to Use Them to Model the Covariance Structure in Proc Mixed Charlie Liu, Dachuang Cao, Peiqi Chen, Tony Zagar Eli Lilly & Company, Indianapolis, IN ABSTRACT

More information

Chapter 11. Analysis of Variance (One-Way)

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

More information

CO2 Handout. t(cbind(co2$type,co2$treatment,model.matrix(~type*treatment,data=co2)))

CO2 Handout. t(cbind(co2$type,co2$treatment,model.matrix(~type*treatment,data=co2))) CO2 Handout CO2.R: library(nlme) CO2[1:5,] plot(co2,outer=~treatment*type,layout=c(4,1)) m1co2.lis

More information

Review of CLDP 944: Multilevel Models for Longitudinal Data

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

More information

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

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

More information

A SAS Macro to Find the Best Fitted Model for Repeated Measures Using PROC MIXED

A SAS Macro to Find the Best Fitted Model for Repeated Measures Using PROC MIXED Paper AD18 A SAS Macro to Find the Best Fitted Model for Repeated Measures Using PROC MIXED Jingjing Wang, U.S. Army Institute of Surgical Research, Ft. Sam Houston, TX ABSTRACT Specifying an appropriate

More information

Example 7b: Generalized Models for Ordinal Longitudinal Data using SAS GLIMMIX, STATA MEOLOGIT, and MPLUS (last proportional odds model only)

Example 7b: Generalized Models for Ordinal Longitudinal Data using SAS GLIMMIX, STATA MEOLOGIT, and MPLUS (last proportional odds model only) CLDP945 Example 7b page 1 Example 7b: Generalized Models for Ordinal Longitudinal Data using SAS GLIMMIX, STATA MEOLOGIT, and MPLUS (last proportional odds model only) This example comes from real data

More information

Models for Clustered Data

Models for Clustered Data Models for Clustered Data Edps/Psych/Soc 589 Carolyn J Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Spring 2019 Outline Notation NELS88 data Fixed Effects ANOVA

More information

The lmm Package. May 9, Description Some improved procedures for linear mixed models

The lmm Package. May 9, Description Some improved procedures for linear mixed models The lmm Package May 9, 2005 Version 0.3-4 Date 2005-5-9 Title Linear mixed models Author Original by Joseph L. Schafer . Maintainer Jing hua Zhao Description Some improved

More information

Independence (Null) Baseline Model: Item means and variances, but NO covariances

Independence (Null) Baseline Model: Item means and variances, but NO covariances CFA Example Using Forgiveness of Situations (N = 1103) using SAS MIXED (See Example 4 for corresponding Mplus syntax and output) SAS Code to Read in Mplus Data: * Import data from Mplus, becomes var1-var23

More information

LDA Midterm Due: 02/21/2005

LDA Midterm Due: 02/21/2005 LDA.665 Midterm Due: //5 Question : The randomized intervention trial is designed to answer the scientific questions: whether social network method is effective in retaining drug users in treatment programs,

More information

Package lmm. R topics documented: March 19, Version 0.4. Date Title Linear mixed models. Author Joseph L. Schafer

Package lmm. R topics documented: March 19, Version 0.4. Date Title Linear mixed models. Author Joseph L. Schafer Package lmm March 19, 2012 Version 0.4 Date 2012-3-19 Title Linear mixed models Author Joseph L. Schafer Maintainer Jing hua Zhao Depends R (>= 2.0.0) Description Some

More information

Testing Indirect Effects for Lower Level Mediation Models in SAS PROC MIXED

Testing Indirect Effects for Lower Level Mediation Models in SAS PROC MIXED Testing Indirect Effects for Lower Level Mediation Models in SAS PROC MIXED Here we provide syntax for fitting the lower-level mediation model using the MIXED procedure in SAS as well as a sas macro, IndTest.sas

More information

Models for Clustered Data

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 information

Generalized Linear Models

Generalized Linear Models Generalized Linear Models Lecture 3. Hypothesis testing. Goodness of Fit. Model diagnostics GLM (Spring, 2018) Lecture 3 1 / 34 Models Let M(X r ) be a model with design matrix X r (with r columns) r n

More information

PAPER 218 STATISTICAL LEARNING IN PRACTICE

PAPER 218 STATISTICAL LEARNING IN PRACTICE MATHEMATICAL TRIPOS Part III Thursday, 7 June, 2018 9:00 am to 12:00 pm PAPER 218 STATISTICAL LEARNING IN PRACTICE Attempt no more than FOUR questions. There are SIX questions in total. The questions carry

More information

Repeated Measures ANOVA Multivariate ANOVA and Their Relationship to Linear Mixed Models

Repeated Measures ANOVA Multivariate ANOVA and Their Relationship to Linear Mixed Models Repeated Measures ANOVA Multivariate ANOVA and Their Relationship to Linear Mixed Models EPSY 905: Multivariate Analysis Spring 2016 Lecture #12 April 20, 2016 EPSY 905: RM ANOVA, MANOVA, and Mixed Models

More information