FAsim {FMradio} | R Documentation |
Simulate data according to the common factor analytic model
Description
FAsim
is a function that enables the simulation of data according to the common factor analytic model.
Usage
FAsim(p, m, n, simplestructure = TRUE, balanced = TRUE,
loadingfix = TRUE, loadingnegative = TRUE,
loadingvalue = .8, loadingvaluelow = .2, numloadings,
loadinglowerH = .7, loadingupperH = .9,
loadinglowerL = .1, loadingupperL = .3)
Arguments
p |
A |
m |
A |
n |
A |
simplestructure |
A |
balanced |
A |
loadingfix |
A |
loadingnegative |
A |
loadingvalue |
A |
loadingvaluelow |
A |
numloadings |
A |
loadinglowerH |
A |
loadingupperH |
A |
loadinglowerL |
A |
loadingupperL |
A |
Details
FAsim
provides certain flexibility when generating data according to an orthogonal common factor-analytic model.
It can produce data according to, for example, (i) factorially pure loadings structures, (ii) loadings-structures with only positive entries or both positive and negative loadings, (iii) loadings-structures with fixed values or varying values, (iv) balanced and unbalanced loadings-structures.
Value
The function returns an object of class list
:
$data |
A standardized data |
$loadings |
Loadings |
$Uniqueness |
A |
$cormatrix |
A |
Note
A uniform distribution is assumed when generating draws between
loadinglowerH
andloadingupperH
.A uniform distribution is assumed when generating draws between
loadinglowerL
andloadingupperL
.The argument
m
cannot exceed the Ledermann-bound (Ledermann, 1937):\lfloor [2p + 1 - (8p + 1)^{1/2}]/2\rfloor
, wherep
indicates the observed-feature dimension.
Author(s)
Carel F.W. Peeters <cf.peeters@vumc.nl>
References
Ledermann, W. (1937). On the rank of the reduced correlational matrix in multiple factor analysis. Psychometrika, 2:85–93.
Peeters, C.F.W. et al. (2019). Stable prediction with radiomics data. arXiv:1903.11696 [stat.ML].
See Also
Examples
## Simulate some data according to a factor model with 3 latent factors
## Balanced and factorially pure loadings structure
simDAT <- FAsim(p = 24, m = 3, n = 40, loadingvalue = .9)
simDAT$loadings
## Simulate some data according to a factor model with 3 latent factors
## Unbalanced and factorially pure loadings structure
simDAT <- FAsim(p = 24, m = 3, n = 40, loadingvalue = .9,
balanced = FALSE, numloadings = c(10,10,4))
simDAT$loadings
## Simulate some data according to a factor model with 3 latent factors
## Unbalanced and factorially non-pure loadings structure
simDAT <- FAsim(p = 24, m = 3, n = 40, loadingvalue = .9,
balanced = FALSE, numloadings = c(10,10,4),
simplestructure = FALSE)
simDAT$loadings
## Simulate some data according to a factor model with 3 latent factors
## Unbalanced and factorially non-pure loadings structure
## Non-fixed high and low loadings
simDAT <- FAsim(p = 24, m = 3, n = 40, loadingvalue = .9,
balanced = FALSE, numloadings = c(10,10,4),
simplestructure = FALSE, loadingfix = FALSE)
simDAT$loadings