Learn R Programming

nFactors (version 2.3.1)

nScreeObjectMethods: Utility Functions for nScree Class Objects

Description

Utility functions for nScree class objects. Some of these functions are already implemented in the nFactors package, but are easier to use with generic functions like these.

Usage

## S3 method for class 'nScree':
is     (object)
 ## S3 method for class 'nScree':
plot   (x, ...)
 ## S3 method for class 'nScree':
print  (x, ...)
 ## S3 method for class 'nScree':
summary(object, ...)

Arguments

x
nScree: an object of the class nScree
object
nScree: an object of the class nScree
...
variable: additionnal parameters to give to the print function with print.nScree, the plotnScree with plot.nScree or to the summary function with

Value

  • Generic functions for the nScree class:
  • is.nScreelogical: is the object of the class nScree?
  • plot.nScreegraphic: plots a figure according to the plotnScre function
  • print.nScreenumeric: vector of the number of components/factors to retain: same as the Components vector from the nScree object
  • summary.nScreedata.frame: details of the results from a nScree analysis: same as the Analysis data.frame from the nScree object, but with easier control of the number of decimals with the digits parameter

References

Raiche, G., Riopel, M. and Blais, J.-G. (2006). Non graphical solutions for the Cattell's scree test. Paper presented at the International Annual meeting of the Psychometric Society, Montreal. [http://www.er.uqam.ca/nobel/r17165/RECHERCHE/COMMUNICATIONS/]

See Also

plotuScree, plotnScree, parallel, plotParallel,

Examples

Run this code
## INITIALISATION
 data(dFactors)                      # Load the nFactors dataset
 attach(dFactors)
 vect         <- Raiche              # Use the example from Raiche
 eigenvalues  <- vect$eigenvalues    # Extract the observed eigenvalues
 nsubjects    <- vect$nsubjects      # Extract the number of subjects
 variables    <- length(eigenvalues) # Compute the number of variables
 rep          <- 100                 # Number of replications for the parallel analysis
 cent         <- 0.95                # Centile value of the parallel analysis

## PARALLEL ANALYSIS (qevpea for the centile criterion, mevpea for the mean criterion)
 aparallel    <- parallel(var     = variables,
                          subject = nsubjects, 
                          rep     = rep, 
                          cent    = cent
                          )$eigen$qevpea  # The 95 centile

## NOMBER OF FACTORS RETAINED ACCORDING TO DIFFERENT RULES 
 results      <- nScree(x=eigenvalues, aparallel=aparallel)
 
 is.nScree(results)
 results
 summary(results)
 
## PLOT ACCORDING TO THE nScree CLASS 
 plot(results)

Run the code above in your browser using DataLab