plot.FF | R Documentation |
This function generates a bar plot of the classification probabilities predicted by the Factor Forest for determining the number of factors. The plot displays the probability distribution across different numbers of factors, with each bar representing the probability for a specific number of factors. Unlike the deep neural network (DNN) model, the Factor Forest can evaluate up to a maximum of 8 factors. The function also annotates each bar with its probability value.
## S3 method for class 'FF'
plot(x, ...)
x |
An object of class |
... |
Additional arguments to be passed to the plotting function. |
None. This function is used for side effects (plotting).
FF
library(EFAfactors)
set.seed(123)
## Take the data.bfi dataset as an example.
data(data.bfi)
response <- as.matrix(data.bfi[, 1:25]) ## Load data
response <- na.omit(response) ## Remove samples with NA/missing values
## Transform the scores of reverse-scored items to normal scoring
response[, c(1, 9, 10, 11, 12, 22, 25)] <- 6 - response[, c(1, 9, 10, 11, 12, 22, 25)] + 1
FF.obj <- FF(response)
## Plot the FF probabilities
plot(FF.obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.