7: Introduction to Longitudinal Analyses and review of GLM Repeated

The Chapter 5 data file, ch5hortest . . .

The hor stands for horizontal. We’ll see what that means shortly.

test1, test2, test3: Scores on identical achievement tests taken at 3 different times with approximately equal intervals between tests.

effective is a dichotomous variable equal to 1 if the teacher is effective and 0 if not. Perceived to be effective?

courses ???

female is a dichotomous variable equal to 1 if teacher is female?

ses is student SES as a Z-score.

ses_mean is mean SES of all students in a school.

courses_mean Mean of courses for a school.

Questions to ask (p. 142)

1. Is there average change in achievement across the 3 test periods?

2. If there is change, what is the shape of the learning curve?

3. Is student growth related to student perceptions about their teachers?


Horizontal vs. Vertical arrangement

Traditional repeated measures analyses require that the repeated measures occupy different columns of the data editor. This arrangement will be called the horizontal arrangement. Here are the first few cases of the Ch 5 data arranged horizontally . . .

The MIXED procedure, on the other hand, requires that repeated measures occupy different rows of the data editor. This will be called a vertical arrangement. It’s also called person.period arrangement. Here are the same data arranged vertically.


Descriptive statistics related to Questions 1 and 2

This table was created using the horizontal file.

Descriptive Statistics /
/ N / Minimum / Maximum / Mean / Std. Deviation /
test1 / 8670 / 24.35 / 99.99 / 48.6323 / 9.71254 /
test2 / 8670 / 26.64 / 99.99 / 53.1073 / 9.88757 /
test3 / 8670 / 25.29 / 99.98 / 57.0944 / 9.89402 /
Valid N (listwise) / 8670

Graphs of selected student learning curves using the vertical file.

Data -> Select Cases

Graphs -> Legacy Dialogs -> Scatter/Dot -> Simple Scatter



Analyses from the horizontal file using the GLM Repeated Measures procedure, p. 151

(These kinds of analyses should be familiar to you.)

These analyses require the horizontal file, ch5hortest.sav


The data editor columns corresponding to the three times are specified.


GET

FILE='G:\MdbT\P595C(Multilevel)\Multilevel and Longitudinal Modeling with IBM SPSS\Ch5Datasets&ModelSyntaxes\ch5hortest.sav'.

GLM test1 test2 test3

/WSFACTOR=time 3 Polynomial /MEASURE=test /METHOD=SSTYPE(3)

/PLOT=PROFILE(time) /EMMEANS=TABLES(time) /PRINT=DESCRIPTIVE ETASQ OPOWER

/CRITERIA=ALPHA(.05) /WSDESIGN=time.

General Linear Model

[DataSet1] G:\MdbT\P595C(Multilevel)\Multilevel and Longitudinal Modeling with IBM SPSS\Ch5Datasets&ModelSyntaxes\ch5hortest.sav

Within-Subjects Factors /
Measure:test /
time / Dependent Variable /
1 / test1 /
2 / test2 /
3 / test3
Descriptive Statistics /
/ Mean / Std. Deviation / N /
test1 / 48.6323 / 9.71254 / 8670 /
test2 / 53.1073 / 9.88757 / 8670 /
test3 / 57.0944 / 9.89402 / 8670
Multivariate Testsc /
Effect / Value / F / Hypothesis df / Error df / Sig. / Partial Eta Squared / Noncent. Parameter / Observed Powerb /
time / Pillai's Trace / .359 / 2424.124a / 2.000 / 8668.000 / .000 / .359 / 4848.248 / 1.000 /
Wilks' Lambda / .641 / 2424.124a / 2.000 / 8668.000 / .000 / .359 / 4848.248 / 1.000 /
Hotelling's Trace / .559 / 2424.124a / 2.000 / 8668.000 / .000 / .359 / 4848.248 / 1.000 /
Roy's Largest Root / .559 / 2424.124a / 2.000 / 8668.000 / .000 / .359 / 4848.248 / 1.000 /
a. Exact statistic /
b. Computed using alpha = .05 /
c. Design: Intercept
Within Subjects Design: time
Mauchly's Test of Sphericityb /
Measure:test /
Within Subjects Effect / Mauchly's W / Approx. Chi-Square / df / Sig. / Epsilona /
Greenhouse-Geisser / Huynh-Feldt / Lower-bound /
time / .977 / 206.113 / 2 / .000 / .977 / .977 / .500 /
Tests the null hypothesis that the error covariance matrix of the orthonormalized transformed dependent variables is proportional to an identity matrix. /
a. May be used to adjust the degrees of freedom for the averaged tests of significance. Corrected tests are displayed in the Tests of Within-Subjects Effects table. /
b. Design: Intercept
Within Subjects Design: time
Tests of Within-Subjects Effects
Measure:test
Source / Type III Sum of Squares / df / Mean Square / F / Sig. / Partial Eta Squared / Noncent. Parameter / Observed Powera
time / Sphericity Assumed / 310760.337 / 2 / 155380.168 / 2581.645 / .000 / .229 / 5163.290 / 1.000
Greenhouse-Geisser / 310760.337 / 1.954 / 159031.307 / 2581.645 / .000 / .229 / 5044.748 / 1.000
Huynh-Feldt / 310760.337 / 1.955 / 158995.891 / 2581.645 / .000 / .229 / 5045.871 / 1.000
Lower-bound / 310760.337 / 1.000 / 310760.337 / 2581.645 / .000 / .229 / 2581.645 / 1.000
Error(time) / Sphericity Assumed / 1043513.536 / 17338 / 60.186
Greenhouse-Geisser / 1043513.536 / 16939.944 / 61.601
Huynh-Feldt / 1043513.536 / 16943.717 / 61.587
Lower-bound / 1043513.536 / 8669.000 / 120.373
a. Computed using alpha = .05
Tests of Within-Subjects Contrasts
Measure:test
Source / time / Type III Sum of Squares / df / Mean Square / F / Sig. / Partial Eta Squared / Noncent. Parameter / Observed Powera
time / Linear / 310416.221 / 1 / 310416.221 / 4801.239 / .000 / .356 / 4801.239 / 1.000
Quadratic / 344.115 / 1 / 344.115 / 6.176 / .013 / .001 / 6.176 / .700
Error(time) / Linear / 560479.947 / 8669 / 64.653
Quadratic / 483033.589 / 8669 / 55.720
a. Computed using alpha = .05
Tests of Between-Subjects Effects /
Measure:test
Transformed Variable:Average /
Source / Type III Sum of Squares / df / Mean Square / F / Sig. / Partial Eta Squared / Noncent. Parameter / Observed Powera /
Intercept / 7.291E7 / 1 / 7.291E7 / 429850.489 / .000 / .980 / 429850.489 / 1.000 /
Error / 1470402.182 / 8669 / 169.616 /
a. Computed using alpha = .05

Estimated Marginal Means

time /
Measure:test /
time / Mean / Std. Error / 95% Confidence Interval /
Lower Bound / Upper Bound /
1 / 48.632 / .104 / 48.428 / 48.837 /
2 / 53.107 / .106 / 52.899 / 53.315 /
3 / 57.094 / .106 / 56.886 / 57.303

Profile Plots

Note that even though the overall relationship looks very nearly linear, the quadratic component was significant, suggesting that the very slight downward bend in the curve is a significant one. Recall that the sample size was 8000+, meaning that even the smallest real effect will be significant.


Traditional repeated analyses with between-subjects factors, p. 155.

Teaching effectiveness: 0- = teacher not judged to be effective; 1 = teacher judged to be effective

Student SES as a between subjects covariate

Note that since we have a continuous covariate in the model, it makes sense to get the parameters of the equation corresponding to that covariate.

GLM test1 test2 test3 BY effective WITH ses

/WSFACTOR=time 3 Polynomial

/MEASURE=test

/METHOD=SSTYPE(3)

/PLOT=PROFILE(time time*effective)

/EMMEANS=TABLES(time) WITH(ses=MEAN)

/EMMEANS=TABLES(effective*time) WITH(ses=MEAN)

/PRINT=DESCRIPTIVE ETASQ OPOWER PARAMETER

/CRITERIA=ALPHA(.05)

/WSDESIGN=time

/DESIGN=ses effective.


General Linear Model

[DataSet1] G:\MdbT\P595C(Multilevel)\Multilevel and Longitudinal Modeling with IBM SPSS\Ch5Datasets&ModelSyntaxes\ch5hortest.sav

Within-Subjects Factors /
Measure:test /
time / Dependent Variable /
1 / test1 /
2 / test2 /
3 / test3
Between-Subjects Factors /
/ N /
effective Teacher effectiveness / .00 / 3901 /
1.00 / 4769
Descriptive Statistics /
/ effective Teacher effectiveness / Mean / Std. Deviation / N /
test1 / .00 / 46.9255 / 12.14551 / 3901 /
1.00 / 50.0284 / 6.82068 / 4769 /
Total / 48.6323 / 9.71254 / 8670 /
test2 / .00 / 50.5716 / 12.39563 / 3901 /
1.00 / 55.1815 / 6.51977 / 4769 /
Total / 53.1073 / 9.88757 / 8670 /
test3 / .00 / 51.7330 / 10.02157 / 3901 /
1.00 / 61.4799 / 7.28562 / 4769 /
Total / 57.0944 / 9.89402 / 8670
Multivariate Testsc /
Effect / Value / F / Hypothesis df / Error df / Sig. / Partial Eta Squared / Noncent. Parameter / Observed Powerb /
time / Pillai's Trace / .360 / 2434.511a / 2.000 / 8666.000 / .000 / .360 / 4869.021 / 1.000 /
Wilks' Lambda / .640 / 2434.511a / 2.000 / 8666.000 / .000 / .360 / 4869.021 / 1.000 /
Hotelling's Trace / .562 / 2434.511a / 2.000 / 8666.000 / .000 / .360 / 4869.021 / 1.000 /
Roy's Largest Root / .562 / 2434.511a / 2.000 / 8666.000 / .000 / .360 / 4869.021 / 1.000 /
time * ses / Pillai's Trace / .001 / 2.196a / 2.000 / 8666.000 / .111 / .001 / 4.392 / .451 /
Wilks' Lambda / .999 / 2.196a / 2.000 / 8666.000 / .111 / .001 / 4.392 / .451 /
Hotelling's Trace / .001 / 2.196a / 2.000 / 8666.000 / .111 / .001 / 4.392 / .451 /
Roy's Largest Root / .001 / 2.196a / 2.000 / 8666.000 / .111 / .001 / 4.392 / .451 /
time * effective / Pillai's Trace / .104 / 502.407a / 2.000 / 8666.000 / .000 / .104 / 1004.814 / 1.000 /
Wilks' Lambda / .896 / 502.407a / 2.000 / 8666.000 / .000 / .104 / 1004.814 / 1.000 /
Hotelling's Trace / .116 / 502.407a / 2.000 / 8666.000 / .000 / .104 / 1004.814 / 1.000 /
Roy's Largest Root / .116 / 502.407a / 2.000 / 8666.000 / .000 / .104 / 1004.814 / 1.000 /
a. Exact statistic /
b. Computed using alpha = .05 /
c. Design: Intercept + ses + effective
Within Subjects Design: time
Mauchly's Test of Sphericityb /
Measure:test /
Within Subjects Effect / Mauchly's W / Approx. Chi-Square / df / Sig. / Epsilona /
Greenhouse-Geisser / Huynh-Feldt / Lower-bound /
time / .969 / 269.218 / 2 / .000 / .970 / .971 / .500 /
Tests the null hypothesis that the error covariance matrix of the orthonormalized transformed dependent variables is proportional to an identity matrix. /
a. May be used to adjust the degrees of freedom for the averaged tests of significance. Corrected tests are displayed in the Tests of Within-Subjects Effects table. /
b. Design: Intercept + ses + effective
Within Subjects Design: time
Tests of Within-Subjects Effects /
Measure:test /
Source / Type III Sum of Squares / df / Mean Square / F / Sig. / Partial Eta Squared / Noncent. Parameter / Observed Powera /
time / Sphericity Assumed / 284416.583 / 2 / 142208.292 / 2486.938 / .000 / .223 / 4973.875 / 1.000 /
Greenhouse-Geisser / 284416.583 / 1.941 / 146558.224 / 2486.938 / .000 / .223 / 4826.248 / 1.000 /
Huynh-Feldt / 284416.583 / 1.942 / 146492.120 / 2486.938 / .000 / .223 / 4828.425 / 1.000 /
Lower-bound / 284416.583 / 1.000 / 284416.583 / 2486.938 / .000 / .223 / 2486.938 / 1.000 /
time * ses / Sphericity Assumed / 245.937 / 2 / 122.969 / 2.150 / .116 / .000 / 4.301 / .443 /
Greenhouse-Geisser / 245.937 / 1.941 / 126.730 / 2.150 / .118 / .000 / 4.173 / .436 /
Huynh-Feldt / 245.937 / 1.942 / 126.673 / 2.150 / .118 / .000 / 4.175 / .436 /
Lower-bound / 245.937 / 1.000 / 245.937 / 2.150 / .143 / .000 / 2.150 / .311 /
time * effective / Sphericity Assumed / 52072.332 / 2 / 26036.166 / 455.320 / .000 / .050 / 910.641 / 1.000 /
Greenhouse-Geisser / 52072.332 / 1.941 / 26832.572 / 455.320 / .000 / .050 / 883.612 / 1.000 /
Huynh-Feldt / 52072.332 / 1.942 / 26820.470 / 455.320 / .000 / .050 / 884.011 / 1.000 /
Lower-bound / 52072.332 / 1.000 / 52072.332 / 455.320 / .000 / .050 / 455.320 / 1.000 /
Error(time) / Sphericity Assumed / 991194.398 / 17334 / 57.182 /
Greenhouse-Geisser / 991194.398 / 16819.517 / 58.931 /
Huynh-Feldt / 991194.398 / 16827.107 / 58.905 /
Lower-bound / 991194.398 / 8667.000 / 114.364 /
a. Computed using alpha = .05
Tests of Within-Subjects Contrasts
Measure:test
Source / time / Type III Sum of Squares / df / Mean Square / F / Sig. / Partial Eta Squared / Noncent. Parameter / Observed Powera
time / Linear / 283779.090 / 1 / 283779.090 / 4795.547 / .000 / .356 / 4795.547 / 1.000
Quadratic / 637.493 / 1 / 637.493 / 11.551 / .001 / .001 / 11.551 / .925
time * ses / Linear / 244.668 / 1 / 244.668 / 4.135 / .042 / .000 / 4.135 / .529
Quadratic / 1.270 / 1 / 1.270 / .023 / .879 / .000 / .023 / .053
time * effective / Linear / 47359.971 / 1 / 47359.971 / 800.330 / .000 / .085 / 800.330 / 1.000
Quadratic / 4712.361 / 1 / 4712.361 / 85.386 / .000 / .010 / 85.386 / 1.000
Error(time) / Linear / 512874.459 / 8667 / 59.176
Quadratic / 478319.939 / 8667 / 55.189
a. Computed using alpha = .05

The shape of the curve relating test scores to time was different for the two effectiveness levels.

Tests of Between-Subjects Effects /
Measure:test
Transformed Variable:Average /
Source / Type III Sum of Squares / df / Mean Square / F / Sig. / Partial Eta Squared / Noncent. Parameter / Observed Powera /
Intercept / 7.122E7 / 1 / 7.122E7 / 492920.714 / .000 / .983 / 492920.714 / 1.000 /
ses / 91.225 / 1 / 91.225 / .631 / .427 / .000 / .631 / .125 /
effective / 218038.615 / 1 / 218038.615 / 1509.048 / .000 / .148 / 1509.048 / 1.000 /
Error / 1252273.450 / 8667 / 144.488 /
a. Computed using alpha = .05

These are reported because of the presence of a covariate, ses.

Parameter Estimates /
Dependent Variable / Parameter / B / Std. Error / t / Sig. / 95% Confidence Interval / Partial Eta Squared / Noncent. Parameter / Observed Powera /
Lower Bound / Upper Bound /
test1 / Intercept / 50.020 / .139 / 360.028 / .000 / 49.748 / 50.293 / .937 / 360.028 / 1.000 /
ses / .221 / .132 / 1.681 / .093 / -.037 / .479 / .000 / 1.681 / .390 /
[effective=.00] / -3.103 / .207 / -14.990 / .000 / -3.509 / -2.697 / .025 / 14.990 / 1.000 /
[effective=1.00] / 0b / . / . / . / . / . / . / . / . /
test2 / Intercept / 55.178 / .139 / 395.910 / .000 / 54.905 / 55.451 / .948 / 395.910 / 1.000 /
ses / .088 / .132 / .669 / .504 / -.171 / .347 / .000 / .669 / .103 /
[effective=.00] / -4.610 / .208 / -22.201 / .000 / -5.017 / -4.203 / .054 / 22.201 / 1.000 /
[effective=1.00] / 0b / . / . / . / . / . / . / . / . /
test3 / Intercept / 61.483 / .125 / 491.978 / .000 / 61.238 / 61.728 / .965 / 491.978 / 1.000 /
ses / -.082 / .118 / -.696 / .486 / -.315 / .150 / .000 / .696 / .107 /
[effective=.00] / -9.747 / .186 / -52.348 / .000 / -10.112 / -9.382 / .240 / 52.348 / 1.000 /
[effective=1.00] / 0b / . / . / . / . / . / . / . / . /
a. Computed using alpha = .05 /
b. This parameter is set to zero because it is redundant.

Estimated Marginal Means