GenDataSample: GenDataSample

Description Usage Arguments Value Author(s) References Examples

View source: R/EFAGenData.R

Description

Bootstraps each variable's score distribution from a supplied data set.

Usage

1
2
GenDataSample(supplied.data, n.factors = 0, max.trials = 5, initial.multiplier = 1,
corr.type = "pearson", seed = 0)

Arguments

supplied.data

Data supplied by user.

n.factors

Number of factors (scalar, default is 0).

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

dataSample of data

Author(s)

John Ruscio

References

Ruscio & Kaczetow (2008)

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 sample of data reproducing distributions and correlations in x
GenDataSample(x)

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