Learn R Programming

Rnest (version 1.2)

pa: Parallel analysis

Description

Parallel analysis

Usage

pa(
  .data = NULL,
  n = NULL,
  nv = NULL,
  nreps = 1000,
  alpha = 0.05,
  ...,
  crit = NULL
)

Value

nfactors (if data is supplied) and sampled eigenvalues

Arguments

.data

a data.frame.

n

the number of subjects.

nv

the number of variables.

nreps

the number of replications.

alpha

type I error rate.

...

other arguments.

crit

critical values to compare the eigenvalues to.

References

Horn, J. L. (1965). A rationale and test for the number of factors in factor analysis. Psychometrika, 30(2), 179–185. tools:::Rd_expr_doi("10.1007/BF02289447")

Examples

Run this code
# To get the number of factors to retain
# from a correlation matrix
pa(ex_2factors, n = 42)

# from a data set
jd <- genr8(n = 404, R = ex_4factors_corr)
pa(jd)

# from a nest output
pa(nest(ex_2factors, n = 42))

# To get the 95th critical eigenvalues
pa(n = 10, nv = 2, nreps = 100)

Run the code above in your browser using DataLab