Nice html table for lavaan structure equation model fitted objects

nice_sem(
  x,
  standardized = TRUE,
  show_fitmeasures = c(CFI = "cfi", TLI = "tli", RMSEA = "rmsea", `RMSEA ci lower` =
    "rmsea.ci.lower", SRMR = "srmr", AIC = "aic", BIC = "bic"),
  remove_cols = NULL,
  show_ci = TRUE,
  round = 2,
  ...
)

Arguments

x

An object returned from the lavaan sem or cfa function.

show_fitmeasures

A named vector with fit measures.

remove_cols

Either column number or column names to be removed.

show_ci

If TRUE, adds columns with 95% confidence intervals.

...

Further arguments passed to the nice_table() function.

Examples

nice_sem(wmisc::lavaan_fit)
Table
Structure equation model
parameter ß
95% CI
se z p
lower upper
Latent variables
remediation → RU_02 0.90 0.88 0.92 0.01 91.87 <.001
remediation → RM_01 0.90 0.88 0.92 0.01 91.94 <.001
remediation → RU_03 0.87 0.85 0.90 0.01 73.12 <.001
remediation → RM_02 0.89 0.87 0.91 0.01 83.82 <.001
development → RE_01 0.91 0.88 0.94 0.02 59.10 <.001
development → RE_02 0.91 0.88 0.94 0.02 59.26 <.001
goal → RZ_02 0.88 0.85 0.90 0.01 63.27 <.001
goal → RZ_01 0.91 0.88 0.93 0.01 72.00 <.001
Covariances
remediation ↔ development 0.59 0.52 0.65 0.03 18.43 <.001
remediation ↔ goal 0.80 0.76 0.84 0.02 40.24 <.001
development ↔ goal 0.74 0.70 0.79 0.02 30.32 <.001
Variances
RU_02 0.19 0.15 0.22 0.02 10.58 <.001
RM_01 0.19 0.15 0.22 0.02 10.57 <.001
RU_03 0.24 0.20 0.28 0.02 11.55 <.001
RM_02 0.21 0.17 0.24 0.02 10.94 <.001
RE_01 0.18 0.12 0.23 0.03 6.39 <.001
RE_02 0.18 0.12 0.23 0.03 6.33 <.001
RZ_02 0.23 0.19 0.28 0.02 9.59 <.001
RZ_01 0.18 0.13 0.22 0.02 7.84 <.001
remediation 1.00 1.00 1.00 0.00

development 1.00 1.00 1.00 0.00

goal 1.00 1.00 1.00 0.00

Intercepts
RU_02 2.94 2.75 3.13 0.10 30.00 <.001
RM_01 2.72 2.54 2.90 0.09 29.54 <.001
RU_03 2.69 2.51 2.87 0.09 29.45 <.001
RM_02 2.48 2.32 2.65 0.09 28.93 <.001
RE_01 3.01 2.82 3.21 0.10 30.13 <.001
RE_02 2.83 2.64 3.01 0.09 29.77 <.001
RZ_02 2.72 2.54 2.90 0.09 29.54 <.001
RZ_01 3.00 2.81 3.20 0.10 30.11 <.001
remediation 0.00 0.00 0.00 0.00

development 0.00 0.00 0.00 0.00

goal 0.00 0.00 0.00 0.00

Modelfit
N parameters 27.00




Observations 554.00




Χ²(17) / p-value 142.89 0.00



CFI 0.97




TLI 0.95




RMSEA 0.12




RMSEA ci lower 0.10




SRMR 0.03




AIC 9644.88




BIC 9761.44




Note. The estimation method employed in this analysis is Maximum Likelihood (ML). The Non-Linear Minimization, Bounded (nlminb) algorithm was applied for optimization. Missing data were addressed using the Full Information Maximum Likelihood (FIML) approach. The analysis was performed with the lavaan package in R (Yves Rosseel, 2012).