cfa_table: Table with items and factor loadings

Description Usage Arguments Examples

View source: R/cfa_table.r

Description

This functions extracts factor loadings from a fitted lavaan object.

Usage

1
2
3
4
5
6
7
8
9
cfa_table(
  object,
  latent_var = NULL,
  items = NULL,
  brief = TRUE,
  std = "std.all",
  print = FALSE,
  group = FALSE
)

Arguments

latent_var

If more than one variable is specified in the CFA, which one should be shown? If left NULL, items of all latent variable will be evaluated.

items

A data frame containing item codes and formulations.

brief

A logical value specifying whether only standardized factor loadings should be shown.

std

Indicates which standarized coefficient should be used (defaults to "std.all").

print

A logical value indicating whether the values should formatted according to APA-guidelines.

new_labels

A vector that needs to have the length of the number of effects that can be used to included a separate column with Hypotheses labels.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(lavaan)
model <- '
  # latent variables
  ind60 =~ x1 + x2 + x3
  dem60 =~ y1 + y2 + y3 + y4
  dem65 =~ y5 + y6 + y7 + y8
'
fit <- sem(model,
           data = PoliticalDemocracy)

# Creating output table
cfa_table(fit, 
          latent_var = "dem65", 
          brief = FALSE,
          print = TRUE)

masurp/pmstats documentation built on Oct. 6, 2020, 9:24 p.m.