View source: R/buildRandomImage4PCA.R
getRandomFS | R Documentation |
getRandomFS
:
generate random observations
(such as factors scores) from a PCA whose variance
match the variance of the dimensions of the PCA.
.
getRandomFS( ev, nObs = 100, FUN = stats::runif, center = FALSE, scale = "SS1", sv = FALSE )
ev |
The variance / eigenvalues per dimension (no default). |
nObs |
the number of observationz to generate, Default: 100 |
FUN |
the random number generating.
function. Default: |
center |
center the numbers. Default: |
scale |
normalization per dimension prior to
re-normalize the factor scores with |
sv |
if |
getRandomFS
: Simulates a set
multivariate coordinates of random observations
whose variance per dimension
(i.e.,
eigenvalues in PCA) will match a given set of variances.
The function generating the set of numbers
can be any such function
(default is runif
).
A matrix
of multidimensional factor scores
with nObs
rows (observations) and number of columns
(variables / components)
equal to
the length of ev
.
Hervé Abdi
scale0
@importFrom stats runif
# generates 10 factors scores from a 4-dimensional space # whose dimensions have variances of 16, 9, 4, and 1 randFS <- getRandomFS(ev = c(16, 9, 4, 1), nObs = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.