Skip to contents

Return all test statistics values

Usage

all_tests(object, sim = NULL, Sigma2 = NULL, Hinv = NULL)

Arguments

object

A lavaan::lavaan() fit object.

sim

(integer) Optional and used for large-scale simulations.

Sigma2

(for internal testing only) by default calculates (weighted) sample covariance

Hinv

(for internal testing only)

Value

Additionally, if sim argument is provided, two columns are appended: Whether the lavaan::lavaan() fit has converged and the matrix rank of \(\Omega_2\) (useful to see if any computational issues arose during model fit.)

Examples

fit <- lavaan::sem(txt_mod(1), gen_data_bin(1, n = 500), std.lv = TRUE,
                   estimator = "PML")
all_tests(fit)
#> # A tibble: 6 × 6
#>      X2    df name          pval Xi_rank     S
#>   <dbl> <dbl> <chr>        <dbl>   <int> <int>
#> 1  2.75  5    Wald         0.739      13    15
#> 2  2.75  5    WaldVCF      0.739       5    15
#> 3  1.76  3.50 WaldDiag,MM3 0.709      15    15
#> 4  1.11  3.07 Pearson,MM3  0.786      15    15
#> 5  1.45  3.75 RSS,MM3      0.806      15    15
#> 6  1.11  3.07 Multn,MM3    0.785      15    15