View source: R/check_sem_out.R

check_sem_out | R Documentation |

Check the output passed to `semlbci()`

```
check_sem_out(
sem_out,
robust = c("none", "satorra.2000"),
multigroup_ok = TRUE
)
```

`sem_out` |
The output from an SEM analysis. Currently only supports a lavaan::lavaan object. |

`robust` |
Whether the LBCI based on robust likelihood ratio
test is to be found. Only "satorra.2000" in |

`multigroup_ok` |
If |

It checks whether the model and the estimation method in
the `sem_out`

object passed to `semlbci()`

are supported by the
current version of `semlbci()`

. This function is to be used by
`semlbci()`

but is exported such that the compatibility of an SEM
output can be checked directly.

Estimation methods (`estimator`

in `lavaan::lavaan()`

) currently
supported:

Maximum likelihood (

`ML`

) and its variants (e.g.,`MLM`

,`MLR`

). For methods with robust test statistics (e.g.,`MLR`

), only robust LBCIs (`robust = "satorra.2000"`

in calling`semlbci()`

) can be requested.

Estimation methods not yet supported:

Generalized least squares (

`GLS`

).Weighted least squares (a.k.a. asymptotically distribution free) (

`WLS`

) and its variants (e.g.,`WLSMV`

).Unweighted least squares (

`ULS`

).Diagonally weighted least squares (

`DWLS`

).Other methods not listed.

Models supported:

Single-group models with continuous variables.

Multiple-group models with continuous variables.

Models not tested:

Models with categorical variables.

Models not yet supported:

Models with formative factors.

Multilevel models.

A numeric vector of one element. If 0, the model and
estimation method are officially supported. If larger than zero,
then the model and method are not officially supported but users
can still try to use `semlbci()`

on it at their own risks. If less
than zero, then the model and/or the method are officially not
supported.

The attributes `info`

contains the reason for a value other than
zero.

`semlbci()`

, `ci_i_one()`

```
library(lavaan)
data(cfa_two_factors)
mod <-
"
f1 =~ x1 + x2 + x3
f2 =~ x4 + x5 + x6
"
fit <- sem(mod, cfa_two_factors)
# Should be 0
check_sem_out(fit)
fit2 <- sem(mod, cfa_two_factors, estimator = "DWLS")
# Should be negative because DWLS is officially not supported
check_sem_out(fit2)
fit3 <- sem(mod, cfa_two_factors, estimator = "MLR")
# Should be negative because MLR is supported only if
# robust is set to "satorra.2000"
check_sem_out(fit3)
# Should be zero because robust is set to "satorra.2000"
check_sem_out(fit3, robust = "satorra.2000")
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.