Errata

  • p. 31. beaujean.model should be
# specify the path model
beaujean.model <- '
salary ~ a*school + c*iq
iq ~ b*school
ind:= b*c
'

The output is


## lavaan (0.5-16) converged normally after  27 iterations
##
##  Number of observations                           300
##
##  Estimator                                         ML
##  Minimum Function Test Statistic                0.000
##  Degrees of freedom                                 0
##  P-value (Chi-square)                           0.000
##
##Parameter estimates:
##
##  Information                                 Expected
##  Standard Errors                             Standard
##
##                   Estimate  Std.err  Z-value  P(>|z|)
## ....
## Defined parameters:
##    ind               0.963    0.323    2.984    0.003
  • Section 4.4. Starting in version 0.5-19, the modindices() function will now only show modification indices for newly added parameters. Therefore, to assess the impact of releasing equality constraints, use the function lavTestScore(). The function applies the Lagrange Multiplier test and univariate score tests for releasing single constraints.

# Lagrange Multiplier test for releasing fixed/constrained parameters
lavTestScore(strong.fit)

The output is:


## $test
##
## total score test:
##
##    test     X2 df p.value
## 1 score 50.655 14       0
##
## $uni
##
## univariate score tests:
##
##      lhs op   rhs     X2 df p.value
## 1   .p2. == .p31.  0.634  1   0.426
## 2   .p3. == .p32.  0.138  1   0.710
## 3   .p4. == .p33.  1.648  1   0.199
## 4   .p6. == .p35.  5.485  1   0.019
## 5   .p7. == .p36.  0.017  1   0.897
## 6   .p8. == .p37.  0.012  1   0.912
## 7  .p20. == .p49.  5.164  1   0.023
## 8  .p21. == .p50. 29.458  1   0.000
## 9  .p22. == .p51.  0.849  1   0.357
## 10 .p23. == .p52.  7.455  1   0.006
## 11 .p24. == .p53.  1.745  1   0.187
## 12 .p25. == .p54.  2.955  1   0.086
## 13 .p26. == .p55.  0.772  1   0.380
## 14 .p27. == .p56.  2.376  1   0.123

The .pX. values correspond to the equality constraints as they appear in the parameter table (plabel column), which can be seen via:


# parameter table
parameterTable(strong.fit)

From this table, you can see the .p20. == .p49. constraint is the one corresponding to the intercept of the Information (Info) subtest.

  • p. 84. Delaware should be New York.

  • Chapter 7

There is a compatibility problem with the semTools package and version 0.5-20 of lavaan. Until it is fixed, one workaround to get the runMI() function to work is to install 0.5-19 of lavaan.


# remove current version of lavaan
location < - find.package("lavaan")
remove.packages("lavaan",location) 

#install version 0.5-19 of lavaan
lavaan.5.19.url <- "https://cran.r-project.org/src/contrib/Archive/lavaan/lavaan_0.5-19.tar.gz"
install.packages(lavaan.5.19.url, repos=NULL, type="source") 
</code>