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")
#> Warning: lavaan->lav_lavaan_step15_baseline():
#> estimation of the baseline model failed.
get_uni_bi_moments(fit)
#> $pdot1
#> [1] 0.916 0.694 0.548 0.752 0.880
#>
#> $pidot1
#> [1] 0.9159984 0.6940003 0.5480027 0.7520066 0.8799972
#>
#> $pdot2
#> [1] 0.672 0.518 0.714 0.818 0.418 0.574 0.628 0.434 0.494 0.680
#>
#> $pidot2
#> [1] 0.6716173 0.5183115 0.7148629 0.8173105 0.4159191 0.5732946 0.6318769
#> [8] 0.4371332 0.4926238 0.6767766
#>