LCT | R Documentation |
An algorithm to identify whether data were generated from a factor or network model using factor and network loadings. The algorithm uses heuristics based on theory and simulation. These heuristics were then submitted to several deep learning neural networks with 240,000 samples per model with varying parameters.
LCT(
data,
n = NULL,
corr = c("auto", "cor_auto", "pearson", "spearman"),
na.data = c("pairwise", "listwise"),
model = c("BGGM", "glasso", "TMFG"),
algorithm = c("leiden", "louvain", "walktrap"),
uni.method = c("expand", "LE", "louvain"),
iter = 100,
seed = NULL,
verbose = TRUE,
...
)
data |
Matrix or data frame. Should consist only of variables to be used in the analysis. Can be raw data or a correlation matrix |
n |
Numeric (length = 1).
Sample size if |
corr |
Character (length = 1).
Method to compute correlations.
Defaults to
For other similarity measures, compute them first and input them
into |
na.data |
Character (length = 1).
How should missing data be handled?
Defaults to
|
model |
Character (length = 1).
Defaults to
|
algorithm |
Character or
|
uni.method |
Character (length = 1).
What unidimensionality method should be used?
Defaults to
|
iter |
Numeric (length = 1).
Number of replicate samples to be drawn from a multivariate
normal distribution (uses |
seed |
Numeric (length = 1).
Defaults to |
verbose |
Boolean (length = 1).
Should progress be displayed?
Defaults to |
... |
Additional arguments that can be passed on to
|
Returns a list containing:
empirical |
Prediction of model based on empirical dataset only |
bootstrap |
Prediction of model based on means of the loadings across the bootstrap replicate samples |
proportion |
Proportions of models suggested across bootstraps |
Hudson F. Golino <hfg9s at virginia.edu> and Alexander P. Christensen <alexpaulchristensen at gmail.com>
Model training and validation
Christensen, A. P., & Golino, H. (2021).
Factor or network model? Predictions from neural networks.
Journal of Behavioral Data Science, 1(1), 85-126.
# Get data
data <- psych::bfi[,1:25]
## Not run: # Compute LCT
## Factor model
LCT(data)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.