Returns univariate and bivariate moments (i.e. positive
probabilities only) based on model i.e. pidot1
and pidot2
and
(weighted) sample i.e. pdot1
and pdot2
.
Arguments
- .lavobject
A
lavaan::lavaan()
fit object.- wtd
(logical) Should the weighted proportions be used?
Examples
fit <- lavaan::sem(txt_mod(1), gen_data_bin(1, n = 500), std.lv = TRUE,
estimator = "PML")
get_uni_bi_moments(fit)
#> $pdot1
#> [1] 0.926 0.712 0.540 0.738 0.876
#>
#> $pidot1
#> [1] 0.9260236 0.7117528 0.5399203 0.7379862 0.8761125
#>
#> $pdot2
#> [1] 0.690 0.524 0.696 0.812 0.414 0.538 0.652 0.418 0.498 0.658
#>
#> $pidot2
#> [1] 0.6861569 0.5208785 0.6940379 0.8235164 0.4259798 0.5449233 0.6436950
#> [8] 0.4157784 0.4899699 0.6547027
#>