Model_factors: Latent Factors Recovery from Variables Loadings

model_factorsR Documentation

Latent Factors Recovery from Variables Loadings

Description

This function retrieves the latent factors and their variable loadings which can be used as R objects to perform other analysis.

Arguments

data

An ⁠R object⁠ obtained from exploratory factor analysis (EFA) using the fa function in psych package.

DATA

A data.frame, the raw data used to carry out the parallel analysis to obtain data object.

Value

A list with the following components:

Latent_frame

data.frame of latent factors based on the variables loadings.

Latent_1

data.frame of variables in Latent factor 1 with their loadings.

Latent_2

data.frame of variables in Latent factor 2 with their loadings.

Latent_3

data.frame of variables in Latent factor 3 with their loadings.

Latent_4

data.frame of variables in Latent factor 3 with their loadings.

Latent_5

data.frame of variables in Latent factor 5 with their loadings.

Latent_6

data.frame of variables in Latent factor 6 with their loadings.

Latent_7

data.frame of variables in Latent factor 7 with their loadings.

Latent_8

data.frame of variables in Latent factor 8 with their loadings.

Latent_9

data.frame of variables in Latent factor 9 with their loadings.

Examples

library(psych)
Data <- Quicksummary
GGn <- names(Data)
GG <- ncol(Data)
GGx <- c(paste0('x0', 1:9), paste("x", 10:ncol(Data), sep = ""))
names(Data) <- GGx
lll <- fa.parallel(Data, fm = 'minres', fa = 'fa')
dat <- fa(Data, nfactors = lll[["nfact"]], rotate = "varimax",fm="minres")

model_factors(data = dat, DATA = Data)


JobNmadu/Dyn4cast documentation built on March 5, 2025, 9:56 p.m.