• Keine Ergebnisse gefunden

Mixed Effects Models

N/A
N/A
Protected

Academic year: 2022

Aktie "Mixed Effects Models"

Copied!
18
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Mixed Effects Models

Applied Multivariate Statistics – Spring 2013

TexPoint fonts used in EMF.

Read the TexPoint manual before you delete this box.: AAAAAAA

(2)

Overview

 Repeated Measures: Correlated samples

 Random Intercept Model

 Random Intercept and Random Slope Model

 Case studies

1

(3)

Revision: Linear Regression

 Example: Strength gain by weight training

 For one person:

2

yj = ¯0 + ¯1xj +²j ²j » N(0; ¾2) i:i:d

“fixed” effects

(4)

Several Persons: Repeated Measures

 Problem 1:

Observations within persons are more correlated than observations between persons

 Problem 2:

The parameters of each person might be slightly different

3

(5)

Weight Training revisited

4

Each person has individual starting strength

Each person has individual starting strength

&

response to training

(6)

Dealing with repeated measures

 Alternative 1: Block effects

Estimate: 𝛽0, 𝛽0,𝑖, 𝛽1, 𝜎

Allows inference on individuals but not on population

 Alternative 2: Mixed effects (contains “fixed” and “random”

effects)

E.g.: Random Intercept model

Estimate: 𝛽0, 𝛽1, 𝜎, 𝜎𝑢

Allows inference on populations but not on individuals

5

yij = (¯0 +¯0;i) +¯1xj + ²j ²j » N(0; ¾2) i:i:d

yij = (¯0 + ui) + ¯1xj + ²ij

²ij » N(0; ¾2); ui » N(0; ¾u2) i:i:d ui; ²ij indep:

“fixed” effects

“fixed” effects

“random” effects

Fixed + Random

= Mixed

i: number of group j: number of sample

(7)

Several Persons: Repeated Measures

 Problem 1:

Observations within persons are more correlated than observations between persons

 Problem 2:

The parameters of each person might be slightly different

6

(8)

Random Intercept Model implies correlated samples

 In Random Intercept Model, we do not explicitly model correlation of samples

 However, this is already implicitly captured in the model:

 Within person, samples are correlated,

between persons samples are uncorrelated

 Restriction: Correlation within person is the same for samples close or distant in time

7

Cov(Yij; Yik) = ¾u2 Cov(Yij; Ylk) = 0 V ar(Yij) = ¾2 +¾u2

(9)

Extending the Random Intercept Model:

Random Intercept and Random Slope Model

8

yij = (¯0 + ui1) + (¯1 + ui2)xj + ²ij

²ij » N(0; ¾2); ui » MV N(0;§) i:i:d

Estimate: 𝛽0, 𝛽1, 𝜎, Σ

Similar calculations as before:

V ar(Yij) = ¾12 + 2¾12xj +¾22x2j +¾2

Cov(Yij; Yik) = ¾12 +¾12(xj +xk) +¾22xjxk Cov(Yij; Ylk) = 0

More complex correlations within person is possible

(10)

Several Persons: Repeated Measures

 Problem 1:

Observations within persons are more correlated than observations between persons

 Problem 2:

The parameters of each person might be slightly different

9

(11)

Summary of models for repeated measures

 Block effect (using fixed effects):

Allows inference on individuals but not on population

 Mixed effects:

Allows inference on population but not on individuals - Random Intercept:

Individually varying intercept

Models constant correlation within person - Random Intercept and Random Slope:

Individually varying intercept and slope Models varying correlation within person

More complex models possible, but harder to fit

10

(12)

Estimation of mixed effects models

 Maximum Likelihood (ML):

- Variance estimates are biased

+ Tests between two models with differing fixed and random effects are possible

 Restricted Maximum Likelihood (REML):

+ Variance estimates are unbiased

- Can only test between two models that have same fixed effects

 P-values etc. using asymptotic theory

11

Recommended for

final model fit (default in R)

(13)

Model diagnostics

 Residual analysis as in linear regression:

- Tukey-Anscombe Plot - QQ-Plot of residuals

 Additionally: Predicted random effects must be normally distributed, therefore

- QQ-Plots for random effects

12

(14)

Mixed effects models in R

 Function “lme” in package “nlme”

 Package “lme4” is a newer, improved version of package

“nlme”, but to me, it still seems to be under construction and therefore is not so reliable

13

(15)

Interpretation of output 1/2

14

with Σ = 9.722 0.43 ∗ 1.54 ∗ 9.72 0.43 ∗ 1.54 ∗ 9.72 1.542

yij = (99:9 + ui1) + (5:9 + ui2)xj + ²ij

²ij » N(0;1:972); ui » MV N(0;§) i:i:d

(16)

Interpretation of output 2/2

 Using the function “intervals” for 95% confidence intervals:

15

At first meeting, people lift on ave. 100 kg (95%-CI: 93-106)

Per week people can lift 6 kg more (4.9-6.9)

The stand.dev. of weights in first week is 10 (6-16) kg

The stand.dev. in training progress is 1.5 (0.9-2.5) kg/week

There is no clear connection btw.

weight in first week and training progress, since CI of correlation covers 0.

Typical deviation from

fitted line is 2.0 (1.7-2.3) kg

(17)

Concepts to know

 Form of RI and RI&RS model and interpretation

 Model diagnostics

16

(18)

R functions to know

 Function “lme” in package “nlme”

Functions:

- “groupedData”, “lmList”

- “intervals”, “coef”, “ranef”, “fixef”

17

Referenzen

ÄHNLICHE DOKUMENTE

Besides its effect on T cell frequencies, DMF treatment significantly reduced activation, differentiation and proliferation of peripheral T cells.. In contrast, DMF-treatment

We will now introduce the Synthetic Aperture Focusing Technique (SAFT), which is a widely used defect imaging algorithm in ultrasonic nondestructive testing9. In related fields such

We establish the asymptotic theory of the maximum likelihood estimator including consistency and limiting distribution, which is new to the spatial econometric literature.. A

The common procedure to estimate gravity equations with panel data is based on the ordinary (or weighted if we model possible time dependence) least squares estimation of

 Random: Draw new “treatment effects” and new random errors (!) Term Fixed effects model Random effects

Factors A and B are called nested if there are different levels of B within each level of A.. Moisture Content

Statistische Aussage für Individuen, aber nicht Bevölkerung.. 

Linear mixed models can substitute for mixed-model analy- ses of variance (ANOVAs) used in traditional experiments, but for a perfectly balanced design with one