GenDataPopulation {RGenData} | R Documentation |
GenDataPopulation
Description
Simulates multivariate nonnormal data using an iterative algorithm
Usage
GenDataPopulation(supplied.data, n.factors, n.cases, max.trials = 5,
initial.multiplier = 1, corr.type = "pearson", seed = 0)
Arguments
supplied.data |
Data supplied by user. |
n.factors |
Number of factors (scalar). |
n.cases |
Number of cases (scalar). |
max.trials |
Maximum number of trials (scalar, default is 5). |
initial.multiplier |
Value of initial multiplier (scalar, default is 1). |
corr.type |
Type of correlation (character, default is "pearson", user can also call "spearman"). |
seed |
seed value (scalar, default is 0). |
Value
dataPopulation of data
Author(s)
John Ruscio
References
Ruscio & Roche (2011)
Examples
# create data matrix x with n = 200 cases, k = 9 variables
# 3 variables load onto each of 3 orthogonal factors
# all marginal distributions are highly skewed
x <- matrix(nrow = 200, ncol = 9)
for (i in 1:3) {
shared <- rchisq(200, 1)
for (j in 1:3) {
x[, (i - 1) * 3 + j] <- shared + rchisq(200, 1)
}
}
# generate (finite) population of data reproducing distributions and correlations in x
GenDataPopulation(x, n.factors = 3, n.cases = 10000)
[Package RGenData version 1.0 Index]