|
|
|
||||
|
|
|||||
In this chapter, the data set is popular.ws.
Table 4.1
Part 1: The variable sex is a fixed effect, not centered.
The result is:
Part 2: The variable sex is a fixed effect, raw centered. We first created a centered variable csex for sex.
->AVERage 1 "sex"
N Missing Mean s.d.
sex 2000 0 0.48700 0.49996
->NAME C8 "csex"
->CALCulate "csex"="sex"-.487
The result is:
Part 3: The variable sex is included as a random effect.
The result is:
Part 4: The variable sex is centered and is a random effect.
The result is:
Table 4.2 on page 60.
Part 1: No interaction, no centering.
The result is:
Part 2: With interaction, but no centering.
The result is:
Part 3: Centering, but no interaction. We first created new variables csex and ctexp.
->AVERage 2 "sex" "texp"
N Missing Mean s.d.
sex 2000 0 0.48700 0.49996
texp 2000 0 14.263 6.5518
->NAME C8 "csex"
->CALCulate "csex"="sex"-.487
->WSET
->NAME C9 "ctexp"
->CALCulate "ctexp"="texp"-14.263
->WSET
The result is:
Part 4: Centering and with interaction. First we created the interaction term of centered variable csex and ctexp.
->CALCulate "csxctp"="csex"*"ctexp"
The result is:
Figure 4.3 Regression lines for popularity of girls and boys, predicted by teacher experience texp.
This uses model in Part 2 of Table 4.2. We use the model to obtain the predicted values by variable sex, texp and their interaction.
Then from Graphs->Customized Graphs, we choose y-variable to be the pred, x-variable to be texp, and group by variable sex.
Table 4.3
Part 1: Intercept only.
This has been done in Chapter 2. We only show the result here.Part 2: Theariable sex is included as a fixed effect.
This has been done in Table 4.1 and we only show the result here.Part 3: The variable texp is also included.
The result is:Part 4: The variable sex is included as a random effect.Part 5: Interaction of sex and texp is included.Table 4.4 can be produced manually based on the equations provided in this section. We omit the calculation here.
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