GenDataPopulation: GenDataPopulation

Description Usage Arguments Value Author(s) References Examples

View source: R/EFAGenData.R

Description

Simulates multivariate nonnormal data using an iterative algorithm

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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)

RGenData documentation built on May 2, 2019, 2:47 p.m.