Skip to contents

Limited information goodness-of-fit tests

Usage

Wald_test(object, Sigma2 = NULL, approx_Omega2 = FALSE)

Wald_diag_test(object, Sigma2 = NULL, approx_Omega2 = FALSE, .order = 3)

Wald_vcovf_test(object, Sigma2 = NULL)

Pearson_RS_test(object, Sigma2 = NULL, approx_Omega2 = FALSE, .order = 2)

Pearson_test(object, Sigma2 = NULL, approx_Omega2 = FALSE, .order = "3")

RSS_test(object, Sigma2 = NULL, approx_Omega2 = FALSE, .order = "3")

Multn_test(object, Sigma2 = NULL, approx_Omega2 = FALSE, .order = "3")

Arguments

object

A lavaan::lavaan() fit object.

Sigma2

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

approx_Omega2

[Experimental] (logical) Should an approximate residual covariance matrix \(\Omega_2\) be used? Defaults to FALSE.

.order

(integer) Either the number of moments to match for the chi-square test statistic matching procedure (choose from 1--3), or the Rao-Scott type adjustment order (choose from 1 or 2).

Value

A data frame containing the test statistics \(X^2\), degrees of freedom, name of the test, and the \(p\)-value.

Functions

  • Wald_test(): The Wald test statistic.

  • Wald_diag_test(): The Wald test statistic using a simple diagonal \(\Omega_2\) matrix.

  • Wald_vcovf_test(): The Wald test statistic bypassing the \(\Omega_2\) matrix (uses orthogonal complements of \(\Delta_2\)).

  • Pearson_RS_test(): The Pearson test with \(p\)-values calculated using a Rao-Scott type adjustment.

  • Pearson_test(): The Pearson test with \(p\)-values calculated using a moment-matching procedure.

  • RSS_test(): The residual sum of squares (RSS) test. Uses moment-matching for \(p\)-value calculations.

  • Multn_test(): The multinomial test. Uses moment-matching for \(p\)-value calculations.

See also

Examples

fit <- lavaan::sem(txt_mod(1), gen_data_bin(1, n = 500), std.lv = TRUE,
                   estimator = "PML")
Wald_test(fit)
#>         X2 df name      pval Xi_rank  S
#> 1 9.176092  5 Wald 0.1022432      13 15