View source: R/extract_latent_parameters.R
| extract_latent_parameters | R Documentation |
This function extracts parameters (loadings, variances, etc.) from a lavaan model. P-values are formatted appropriately (e.g., <0.001 for very small values).
extract_latent_parameters(
model,
type = "loadings",
standardized = FALSE,
digits = 3,
...
)
model |
A fitted lavaan model. |
type |
Type of parameters to extract: "loadings", "variances", or "all". Default is "loadings". |
standardized |
Logical; if TRUE, returns standardized estimates. Default is FALSE. |
digits |
Number of decimal places for p-value formatting (default=3) |
... |
Additional arguments passed to |
A data frame containing the extracted parameters with formatted p-values.
library(lavaan)
model <- 'F1 =~ x1 + x2 + x3'
fit <- cfa(model, data = HolzingerSwineford1939)
extract_latent_parameters(fit, type = "loadings")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.