UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

SPSS Textbook Examples
Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence
by Judith D. Singer and John B. Willett
Chapter 6: Modeling discontinuous and nonlinear change


Table 6.1, page 192

Excerpts from person-period data set for high school dropout study

get file = "c:\alda\wages_pp.sav".

compute filt=0.
if any(id,206,2365,4384) filt=1.
execute.
filter by filt.

list /var=id lnw exper ged postexp.

filter off.

      ID      LNW    EXPER      GED  POSTEXP

  206.00     2.03     1.87      .00      .00
  206.00     2.30     2.81      .00      .00
  206.00     2.48     4.31      .00      .00
 2365.00     1.78      .66      .00      .00
 2365.00     1.76     1.68      .00      .00
 2365.00     1.71     2.74      .00      .00
 2365.00     1.74     3.68      .00      .00
 2365.00     2.19     4.68     1.00      .00
 2365.00     2.04     5.72     1.00     1.04
 2365.00     2.32     6.72     1.00     2.04
 2365.00     2.67     7.87     1.00     3.19
 2365.00     2.42     9.08     1.00     4.40
 2365.00     2.39    10.05     1.00     5.37
 2365.00     2.49    11.12     1.00     6.44
 2365.00     2.44    12.05     1.00     7.37
 4384.00     2.86      .10      .00      .00
 4384.00     1.53     1.04      .00      .00
 4384.00     1.59     1.73     1.00      .00
 4384.00     1.97     3.13     1.00     1.40
 4384.00     1.68     4.28     1.00     2.56
 4384.00     2.63     5.72     1.00     4.00
 4384.00     2.58     6.02     1.00     4.30

Number of cases read:  22    Number of cases listed:  22

Table 6.2, page 203

Alternative discontinuous change trajectories: HS dropout data.

title 'Model A: EXPER, HGC-9, BLACK*EXPER, UE-7'.
mixed lnw with exper hgc_9 black ue_7
  /print=solution
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7
  /random=intercept exper | subject(id) covtype(un).

title 'Model B: A + GED as fixed and random effect'.
mixed lnw with exper hgc_9 black ue_7 ged
  /print=solution
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 ged
  /random=intercept exper ged | subject(id) covtype(un).

title 'Model C: Model B without random effect of GED '.
mixed lnw with exper hgc_9 black ue_7 ged
  /print=solution
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 ged
  /random=intercept exper | subject(id) covtype(un).

title 'Model D: A + POSTEXP as fixed and random effect'.
* Needed to add /criteria statement to get model to converge.
mixed lnw with exper hgc_9 black ue_7 ged postexp
  /print=solution
  /criteria = scoring(10)
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 postexp
  /random=intercept exper postexp | subject(id) covtype(un).
	
title 'Model E: Model D without random effect of POSTEXP '.
mixed lnw with exper hgc_9 black ue_7 postexp
  /print=solution
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 postexp
  /random=intercept exper | subject(id) covtype(un).

title 'Model F: Model A with fixed and random effects of GED and POSTEXP '.
* Needed to add /criteria statement to get model to converge.
mixed lnw with exper hgc_9 black ue_7 postexp ged
  /print=solution
  /criteria = scoring(10)
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 ged postexp
  /random=intercept exper ged postexp | subject(id) covtype(un).

title 'Model G: Model F without random effect of POSTEXP '.
mixed lnw with exper hgc_9 black ue_7 postexp ged
  /print=solution
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 ged postexp
  /random=intercept exper ged | subject(id) covtype(un).

title 'Model H: Model F without random effect of GED'.
* Needed to add /criteria statement to get model to converge.
mixed lnw with exper hgc_9 black ue_7 postexp ged
  /print=solution
  /criteria = scoring(10)
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 ged postexp
  /random=intercept exper postexp | subject(id) covtype(un).

title 'Model I: Model A with GED and GED*EXPER as fixed and random effects'.
* ??? convergence problems, HESSIAN not positive definate.
mixed lnw with exper hgc_9 black ue_7 postexp ged
  /print=solution
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 ged ged*exper
  /random=intercept exper ged ged*exper | subject(id) covtype(un).

title 'Model J: Model I without random effect of GED*EXPER'.
mixed lnw with exper hgc_9 black ue_7 postexp ged
  /print=solution
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 ged ged*exper 
  /random=intercept exper ged | subject(id) covtype(un).

Table 6.2a: EXPER, HGC-9, BLACK*EXPER, UE-7

Table 6.2b: A + GED as fixed and random effect

Table 6.2C: Model B without random effect of GED

Table 6.2D: A + POSTEXP as fixed and random effect

Table 6.2E: Model D without random effect of POSTEXP

Table 6.2F: Model A with fixed and random effects of GED and POSTEXP

Table 6.2G: Model F without random effect of POSTEXP

Table 6.2H: Model F without random effect of GED

Table 6.2I: Model A with GED and GED*EXPER as fixed and random effects

??? Did not properly converge.

Table 6.2J: Model I without random effect of GED*EXPER


Table 6.3, page 205

Table 6.3 Model F (with discontinuities in elevation and slope)

Note, needed to include /criteria subcommand to get model to converge.

mixed lnw with exper hgc_9 black ue_7 postexp ged
  /print=solution
  /criteria = scoring(10) 
  /method=ml
  /fixed=intercept exper hgc_9 exper*black ue_7 ged postexp 
  /random=intercept exper ged postexp | subject(id) covtype(un).


Figure 6.3, page 206 Skipped for now.

Figure 6.4, page 209 Skipped for now.


Figure 6.6, page 212 Skipped for now.


Figure 6.7, page 218 Skipped for now.


Table 6.5, page 221

Alternative polynomial change trajectories for externalizing data

title "Table 6.5a: No Change".
mixed external 
  /print=solution
  /method=ml
  /fixed=intercept 
  /random=intercept | subject(id) covtype(un).

title "Table 6.5B: linear change'.
mixed external with time
  /print=solution
  /method=ml
  /fixed=intercept time
  /random=intercept time | subject(id) covtype(un).
	
title "Table 6.5c: quadratic change'.
mixed external with time time2
  /print=solution
  /method=ml
  /fixed=intercept time time2
  /random=intercept time time2 | subject(id) covtype(un).
	
title "Table 6.5D: cubic change'.
* ??? convergence problems, HESSIAN not positive definite .
mixed external with time time2 time3
  /criteria = mxstep(500) hconverge(10,absolute)
  /print=solution history(1)
  /method=ml
  /fixed=intercept time time2 time3
  /random=intercept time time2 time3 | subject(id) covtype(un).

Table 6.5a: no change

Table 6.5b: linear change

Table 6.5c: Quadratic change

Table 6.5d: Cubic change

Note convergence problems!


How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.