Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

varTable

Variable Table


Description

Summary information about the variables included in either a data.frame, or a fitted lavaan object.

Usage

varTable(object, ov.names = names(object), ov.names.x = NULL, 
    ordered = NULL, factor = NULL, as.data.frame. = TRUE)

Arguments

object

Either a data.frame, or an object of class lavaan.

ov.names

Only used if object is a data.frame. A character vector containing the variables that need to be summarized.

ov.names.x

Only used if object is a data.frame. A character vector containing additional variables that need to be summarized.

ordered

Character vector. Which variables should be treated as ordered factors

factor

Character vector. Which variables should be treated as (unordered) factors?

as.data.frame.

If TRUE, return the list as a data.frame.

Value

A list or data.frame containing summary information about variables in a data.frame. If object is a fitted lavaan object, it displays the summary information about the observed variables that are included in the model. The summary information includes variable type (numeric, ordered, ...), the number of non-missing values, the mean and variance for numeric variables, the number of levels of ordered variables, and the labels for ordered variables.

Examples

HS.model <- ' visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '

fit <- cfa(HS.model, data=HolzingerSwineford1939)
varTable(fit)

lavaan

Latent Variable Analysis

v0.6-10
GPL (>= 2)
Authors
Yves Rosseel [aut, cre] (<https://orcid.org/0000-0002-4129-4477>), Terrence D. Jorgensen [aut] (<https://orcid.org/0000-0001-5111-6773>), Nicholas Rockwood [aut] (<https://orcid.org/0000-0001-5931-183X>), Daniel Oberski [ctb], Jarrett Byrnes [ctb], Leonard Vanbrabant [ctb], Victoria Savalei [ctb], Ed Merkle [ctb], Michael Hallquist [ctb], Mijke Rhemtulla [ctb], Myrsini Katsikatsou [ctb], Mariska Barendse [ctb], Florian Scharf [ctb], Han Du [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.