Learn R Programming

psych (version 1.0-77)

factor.stats: Find various goodness of fit statistics for factor analysis and principal components

Description

Chi square and other goodness of fit statistics are found based upon the fit of a factor or components model to a correlation matrix. Although these statistics are normally associated with a maximum likelihood solution, they can be found for minimal residual (OLS), principal axis, or principal component solutions as well. Primarily called from within these functions, factor.stats can be used by itself. Measures of factorial adequacy and validity follow the paper by Grice, 2001.

Usage

factor.stats(r, f, phi=NULL, n.obs = NA)
factor.scores(x,f)

Arguments

r
A correlation matrix or a data frame of raw data
x
A data frame or matrix of raw data
f
A factor analysis loadings matrix or the output from a factor or principal components analysis
phi
A factor intercorrelation matrix if the factor solution was oblique
n.obs
The number of observations for the correlation matrix. If not specified, and a correlation matrix is used, chi square will not be reported. Not needed if the input is a data matrix.

Value

  • fitHow well does the factor model reproduce the correlation matrix. (See VSS, ICLUST, and principal for this fit statistic.
  • fit.offhow well are the off diagonal elements reproduced?
  • dofDegrees of Freedom for this model. This is the number of observed correlations minus the number of independent parameters. Let n=Number of items, nf = number of factors then $dof = n * (n-1)/2 - n * nf + nf*(nf-1)/2$
  • objectivevalue of the function that is minimized by maximum likelihood procedures. This is reported for comparison purposes and as a way to estimate chi square goodness of fit. The objective function is $f = log(trace ((FF'+U2)^{-1} R) - log(|(FF'+U2)^{-1} R|) - n.items$.
  • STATISTICIf the number of observations is specified or found, this is a chi square based upon the objective function, f. Using the formula from factanal(which seems to be Bartlett's test) : $\chi^2 = (n.obs - 1 - (2 * p + 5)/6 - (2 * factors)/3)) * f$
  • PVALIf n.obs > 0, then what is the probability of observing a chisquare this large or larger?
  • PhiIf oblique rotations (using oblimin from the GPArotation package or promax) are requested, what is the interfactor correlation.
  • R2The multiple R square between the factors and factor score estimates, if they were to be found. (From Grice, 2001)
  • r.scoresThe correlations of the factor score estimates, if they were to be found.
  • weightsThe beta weights to find the factor score estimates
  • validThe validity coffiecient of course coded (unit weighted) factor score estimates (From Grice, 2001)
  • score.corThe correlation matrix of course coded (unit weighted) factor score estimates, if they were to be found, based upon the loadings matrix.

Details

Combines the goodness of fit tests used in factor.pa, factor.minres, and principal into one function. If the matrix is singular, will smooth the correlation matrix before finding the fit functions.

References

Grice, James W.,2001, Computing and evaluating factor scores, Psychological Methods, 6,4, 430-450.

See Also

factor.pa for principal axis factor analysis, factor.minres for minimum residual factor analysis, and principal for principal components.

Examples

Run this code
v9 <- sim.hierarchical()
f3 <- factor.minres(v9,3)
factor.stats(v9,f3,n.obs=500)
f3o <- factor.pa(v9,3,rotate="Promax")
factor.stats(v9,f3o,n.obs=500)

Run the code above in your browser using DataLab