Repeated Measures BUSI 6480 Lecture 8. Subject An individual or experimental unit from which a...

Preview:

Citation preview

Repeated Measures

BUSI 6480Lecture 8

Subject An individual or experimental unit from which a sequence of responses are recorded.

Within-subjects factor: A set of conditions in which a dependent variable is measured repeatedly for all subjects.

Trials: The sequential conditions of the within-subjects factor.

Between-subjects factor: A set of conditions in which a dependent variable is measured on independent groups of sample members, where each group is exposed to a different condition. The conditions that constitute this factor type are called groups.

Repeated measures ANOVA with between-subjects factors: An experimental design in which an analysis has both within-subjects factors and between subjects factors.

Repeated Measures Terminology

Repeated Measures Data: data collected over sequential time periods per subject.

Data typically take one of two formats:1. A record is created for each subject

with responses over time periods and independent variables.

2. A record is created for each time period and for each subject. Thus one subject would have multiple records.

Typically, a Between Subject Factor and a Within Subjects Factor Are Present

Types of Program – Between Subjects Sequence (time) – Within Subjects

Within Subject Covariance Structures Examples

Some Popular Choices for Covariance Structures

VC = variance componentsCS = compound symmetryUN = Unstructured

Some Correlation/Covariance Patterns

Covariance Patterns – Subpatterns

Note that VC is a special case of CS. (nested) And CS is a special case of HF. (nested) And HF is a special case of UN. (nested)

Note: Choice of Covariance Pattern does not affect test of Between Subjects Factor.

GLM Repeated Measures Procedure in SAS/SPSS

1. Assumes either a Type H or unstructured within-subject covariance matrix

2. Automatically performs a sphericity test with the PRINTE option

3. Requires data to be inputted with one record per subject.

4. Estimates covariance parameters using a method of moments.

5. Requires balanced data – ignores subjects with missing data

Mixed Procedure in SAS/SPSSNote the advantages in the Mixed ApproachProc Mixed1. Allows a wide variety of within-subject covariance

structures with Type H being only one.2. Sphericity test can be performed by running both

TYPE=UN and TYPE=HF and subtracting the chi-square values and taking a difference in the degrees of of freedom.

3. Requires column format with one observation per time period.

4. Estimates covariance parameters using a (restricted) maximum likelihood method (same as used in SEM).

5. Allows data to be missing.

SPSS: GLM > Repeated Measures

SPSS: Mixed Models > Linear (not covered)

GLM Approach to Repeated Measures

Mixed Approach to Repeated Measures

SPSS: Define Repeated Measures -GLM

SPSS: GLM - Within and Between Subjects Factors

In SPSS, AIC and BIC (aka SBC) will appear in a box labeled Information Criteria

Information Criteriaa

1974.222

1978.222

1978.320

1985.895

1983.895

-2 Restricted LogLikelihood

Akaike's InformationCriterion (AIC)

Hurvich and Tsai'sCriterion (AICC)

Bozdogan's Criterion(CAIC)

Schwarz's BayesianCriterion (BIC)

The information criteria aredisplayed in smaller-is-better forms.

Dependent Variable: y.a.

-2LL

Using the Chi-Square Difference Approach for Nested Models

SPSS Mixed Model Dialog Box – Select Covariance Structure

Insert Factors, Covariates, and Residual Weight and Dependent Variable

Example of Fixed Effects Model Building Dialog Box.Always include Intercept (unless you have a reason not to)

Under Subject Groupings, the variable Worker can be specified, unless only a Fixed Effects model is used.

Tests for Covariance Parameters and Parameter Estimates are Options under Statistics

SPSSSelect Restricted Max Likelihood for most mixed models.

Increase max iterations for ill conditioned data.

Trends in Repeated Measures

In SPSS GLM, click on contrast within Repeated Measures and select polynomial.

In Mixed in SPSS, add additionally created square and cube terms and interactions with these terms if necessary to data set.

When using a polynomial in the repeated measure, the variable Day, its square and cubic terms are used as covariates and Day is not a factor variable.

The notation for an interaction between a repeated variable and a between groups factor may be expressed as the between-subjects factor listed with the repeated variable next to it in parenthesis.

The degrees of freedom for random effects can be fractional rather than integer values, indicating that fractions of sources of variation were used in synthesizing appropriate error terms.

Example in Getting p-value for Chi-square Statistic

Data mypvalue; x=18.307; df = 10; pvalue = 1- probchi(x,df); proc print data=mypvalue; run; quit;

Solution is a p-value of .05 in print out.

Repeated Measures Experiments Often Have Missing Values for Several Time Periods

SAS proc mi data=MyData round=.1 seed=5432

nimpute=1 out= outmi; var myDepVar myTimePeriod1-myTimePeriod4; run; proc print data = outmi;

NOTE: SAS uses a Markov Chain Monte Carlo method to estimate missing values in Proc mi.

Examine Output of Missing Data Patterns (patterns should be random)

1 X X X X X X X 39 2 X X X X X . X 4 3 X X X X . X X 3 4 X X . X X X X 7 5 X . X X X X X 6 6 X . X X . X X 1

Ideally, no one pattern should have more than25% of the missing values (except for the patternwith no missing values).