| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/lavaan.R |
| 3 |
\name{tidy.lavaan} |
| 4 |
\alias{tidy.lavaan} |
| 5 |
\alias{lavaan_tidiers} |
| 6 |
\alias{sem_tidiers} |
| 7 |
\alias{cfa_tidiers} |
| 8 |
\title{Tidy a(n) lavaan object} |
| 9 |
\usage{ |
| 10 |
\method{tidy}{lavaan}(x, conf.int = FALSE, conf.level = 0.95, ...) |
| 11 |
} |
| 12 |
\arguments{ |
| 13 |
\item{x}{A \code{lavaan} object, such as those returned from \code{\link[lavaan:cfa]{lavaan::cfa()}}, |
| 14 |
and \code{\link[lavaan:sem]{lavaan::sem()}}.} |
| 15 |
|
| 16 |
\item{conf.int}{Logical indicating whether or not to include a confidence |
| 17 |
interval in the tidied output. Defaults to \code{FALSE}.} |
| 18 |
|
| 19 |
\item{conf.level}{The confidence level to use for the confidence interval |
| 20 |
if \code{conf.int = TRUE}. Must be strictly greater than 0 and less than 1. |
| 21 |
Defaults to 0.95, which corresponds to a 95 percent confidence interval.} |
| 22 |
|
| 23 |
\item{...}{Additional arguments passed to \code{\link[lavaan:parameterEstimates]{lavaan::parameterEstimates()}}. |
| 24 |
\strong{Cautionary note}: Misspecified arguments may be silently ignored.} |
| 25 |
} |
| 26 |
\value{ |
| 27 |
A \code{\link[tibble:tibble]{tibble::tibble()}} with one row for each estimated parameter and |
| 28 |
columns: |
| 29 |
|
| 30 |
\item{term}{The result of paste(lhs, op, rhs)} |
| 31 |
\item{op}{The operator in the model syntax (e.g. \verb{~~} for covariances, or |
| 32 |
\code{~} for regression parameters)} |
| 33 |
\item{group}{The group (if specified) in the lavaan model} |
| 34 |
\item{estimate}{The parameter estimate (may be standardized)} |
| 35 |
\item{std.error}{} |
| 36 |
\item{statistic}{The z value returned by \code{\link[lavaan:parameterEstimates]{lavaan::parameterEstimates()}}} |
| 37 |
\item{p.value}{} |
| 38 |
\item{conf.low}{} |
| 39 |
\item{conf.high}{} |
| 40 |
\item{std.lv}{Standardized estimates based on the variances of the |
| 41 |
(continuous) latent variables only} |
| 42 |
\item{std.all}{Standardized estimates based on both the variances |
| 43 |
of both (continuous) observed and latent variables.} |
| 44 |
\item{std.nox}{Standardized estimates based on both the variances |
| 45 |
of both (continuous) observed and latent variables, but not the |
| 46 |
variances of exogenous covariates.} |
| 47 |
} |
| 48 |
\description{ |
| 49 |
Tidy summarizes information about the components of a model. |
| 50 |
A model component might be a single term in a regression, a single |
| 51 |
hypothesis, a cluster, or a class. Exactly what tidy considers to be a |
| 52 |
model component varies across models but is usually self-evident. |
| 53 |
If a model has several distinct types of components, you will need to |
| 54 |
specify which components to return. |
| 55 |
} |
| 56 |
\examples{ |
| 57 |
\dontshow{if (rlang::is_installed("lavaan")) withAutoprint(\{ # examplesIf} |
| 58 |
|
| 59 |
# load libraries for models and data |
| 60 |
library(lavaan) |
| 61 |
|
| 62 |
cfa.fit <- cfa("F =~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9", |
| 63 |
data = HolzingerSwineford1939, group = "school" |
| 64 |
) |
| 65 |
|
| 66 |
tidy(cfa.fit) |
| 67 |
\dontshow{\}) # examplesIf} |
| 68 |
} |
| 69 |
\seealso{ |
| 70 |
\code{\link[=tidy]{tidy()}}, \code{\link[lavaan:cfa]{lavaan::cfa()}}, \code{\link[lavaan:sem]{lavaan::sem()}}, |
| 71 |
\code{\link[lavaan:parameterEstimates]{lavaan::parameterEstimates()}} |
| 72 |
|
| 73 |
Other lavaan tidiers: |
| 74 |
\code{\link{glance.lavaan}()} |
| 75 |
} |
| 76 |
\concept{lavaan tidiers} |