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  3.19  5    Wald         0.670      14    15
#> 2  3.18  5    WaldVCF      0.672       5    15
#> 3  1.72  3.23 WaldDiag,MM3 0.673      15    15
#> 4  1.60  3.50 Pearson,MM3  0.743      15    15
#> 5  2.20  4.11 RSS,MM3      0.715      15    15
#> 6  1.59  3.50 Multn,MM3    0.743      15    15