library(lavaan)
#> This is lavaan 0.6-11
#> lavaan is FREE software! Please report any bugs.
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
dat <- HolzingerSwineford1939[, paste0("x", 1:9)]
dat_cov <- cov(dat)
n <- nrow(dat)
fit <- cfa(HS.model, sample.cov = dat_cov, sample.nobs = n)
fit
#> lavaan 0.6-11 ended normally after 35 iterations
#>
#> Estimator ML
#> Optimization method NLMINB
#> Number of model parameters 21
#>
#> Number of observations 301
#>
#> Model Test User Model:
#>
#> Test statistic 85.306
#> Degrees of freedom 24
#> P-value (Chi-square) 0.000
fit_cov <- lavInspect(fit, "sampstat")$cov
as.matrix(fit_cov / dat_cov)
#> x1 x2 x3 x4 x5 x6 x7 x8 x9
#> x1 0.997
#> x2 0.997 0.997
#> x3 0.997 0.997 0.997
#> x4 0.997 0.997 0.997 0.997
#> x5 0.997 0.997 0.997 0.997 0.997
#> x6 0.997 0.997 0.997 0.997 0.997 0.997
#> x7 0.997 0.997 0.997 0.997 0.997 0.997 0.997
#> x8 0.997 0.997 0.997 0.997 0.997 0.997 0.997 0.997
#> x9 0.997 0.997 0.997 0.997 0.997 0.997 0.997 0.997 0.997
(n - 1) / n
#> [1] 0.9966777
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/30cfc14c-31f7-49e7-bfcb-120d9528c3a9n%40googlegroups.com.
All values differ by the factor (N - 1) / N.What is the reason for this deviation?