|
Below we provide a 2-level example of a growth curve analysis of pro-deviant attitude for fourteen-year-old youth over a period of five years with data from the National Youth Survey (Elliot, Huizinga, & Menard, 1989; Raudenbush & Chan, 1993). In our example, the level-1 file, nysw2.sav, has 1,066 observations collected from interviewing annually fourteen-years-old youths beginning at 1976:
|
|
a 9-item scale assessing attitudes favorable to deviant behavior.
Subjects were asked how wrong (very wrong, wrong, a little bit wrong, not wrong at all) they believe it is for someone their age to, for example, damage and destroy property, use marijuana, use alcohol, sell hard drugs, or steal.
The measure was positively skewed, so a logarithmic transformation was performed to reduce the skewness. |
|
|
Exposure to deviant peers.
Subjects were asked how many of their friends engaged in the nine deviant behaviors surveyed in the ATTIT scale. |
|
|
age of the participant |
|
|
age of participant at a specific time minus 11 |
|
|
age of participant at a specific time minus 13 |
|
|
AGE11* AGE11 |
|
|
AGE13* AGE13 |
|
|
indicator for measure at time 1 |
|
|
indicator for measure at time 2 |
|
|
indicator for measure at time 3 |
|
|
indicator for measure at time 4 |
|
|
indicator for measure at time 5 |
The level-2 data file, nysb2.sav, consists of 241 youths and three variables per participant.
|
|
an indicator for gender (1 = female, 0 = male) |
|
|
an indicator for ethnicity (1 = minority, 0 = other) |
|
|
income
|
At level-1, we formulate a polynomial model of order 2 using AGE16 and AGE16S with FEMALE and MINORITY as covariates at level-2 modeling the intercept, the expected pro-deviant attitude score at age 16 for subject j; and the slopes of AGE16 abd AGE16S, which are the expected average linear and quadratic growth rate for pro-deviant attitude score respectively. We will ask WHLM to graph the predicted values of pro-deviant attitude scores at different ages for different gender-by-ethnicity groups.

To prepare the graph
After running the model, select Basic Settings to open the Basic Model Specifications HLM2 dialog box. Enter a name for the graphics file. The default name is graphequ.geq. Also enter a title and name the output filename, save the command file, and run the analysis.
Open the File menu and choose Graph Equations. An Equation Graphing dialog box will open.

We now proceed to select the predictor variables and specify their ranges or values, and choose the graphing functions and the various attributes of the plot for the polynomial model.
Select AGE16 in the X focus Level 1 drop-down list box to graph pro-deviant attitude score as a function of age. Select Entire range in the Range of x-axis drop-down list box to include the entire range of age on the x axis in the graph. Click 1 in the Categories/transforms/interactions section and select power of x/z for polynomial relationships. An Equation Graphing - power dialog box will open.

8The text box to the left of the equal sign is for the entry of the transformed variable. Select AGE16S in the drop-down list box. The text box to the right is for the entry of the original variable. AGE16 will appear in the drop-down list box as it is the only level-1 variable left. Enter 2 in the text box for the power to be raised. Click OK.

Click Range/Legend/Color to specify the ranges for x- and y-axis (the default values are those computed from the data), to enter legend and graph titles, and to select screen color. Enter Pro-deviant attitude score as a function of age, gender and ethnicity in the text box for Graph title. Click OK.

Click the Other settings button and click the selection button for Smooth in For continuous x section to display a set of smooth curves.
Select FEMALE in the Z focus(1) drop-down list box to graph pro-deviant attitude score as a function of age for male and female youths. Use the two actual values will appear in the textbox for the Range of z-axis as FEMALE is an indicator variable. We will use this default option. Select MINORITY in the Z focus(2) drop-down list box to graph pro-deviant attitude score as a function of age for minority and non-minority male and female youths. Use the two actual values will appear in the textbox for the Range of z-axis as MINORITY again is an indicator variable. We will again use the default option.

Click OK. A colored version of the plot showing the relationship between pro-deviant attitude score and age for different gender-by-ethnicity groups will appear. The curves indicate that there is a non-monotonic and nonlinear relationship between pro-deviant attitude scores and age for minority and non-minority male youths over the five year period. Such a relationship, however, does not exist for minority and non-minority female youths.

|