Code covered by the BSD License  

Highlights from
anfactpc

5.0

5.0 | 4 ratings Rate this file 5 Downloads (last 30 days) File Size: 6.34 KB File ID: #10601
image thumbnail

anfactpc

by Antonio Trujillo-Ortiz

 

31 Mar 2006 (Updated 05 Apr 2006)

Factor Analysis by the Principal Components Method.

| Watch this File

File Information
Description

This m-file deals with the principal component solution of the factor model thru the complete data matrix, the latent root criterion, and uses the varimax factor rotation. Optionally, it also gives the residual matrix, which results of the difference between the original correlation and the correlation structure for the factor model.

The purpose of Factor Analysis is to describe as possible the covariance relationships among many variables in terms of a few underlying and unobservable random quantities called factors. It can be considered as an extension of Principal Components Analysis, but its approximation is more elaborate. The factor model postulates that the X-observable random vector with p components is linearly dependent upon a few unobservable random variables F_1,F_2,...,F_m, called common factors, and p additional sources of variation e_1,e_2,...,e_m, called errors or specific factors (a component unique to that particular X_i and not shared by the others X´s). So, the model is:

           X_1 = b_11*F_1 + b_12*F_2 + ...+ b_1m*F_m + e_1
           X_2 = b_21*F_1 + b_22*F_2 + ...+ b_2m*F_m + e_2
            . .
            : :
           X_p = b_p1*F_1 + b_p2*F_2 + ...+ b_pm*F_m + e_p

In matrix notation it can be written as,
                   X = B*F + e
where, B is the matrix of loadings of the i-th variable on the j-th factor. F and e are, respectively, the random vectors of the common factors and errors. Value m are the number of factors specified ahead of time to complete the model and selected by a spacific criteria as the latent root, a priori, percentage of variance or scree test. The latent root criterion can be used as a guideline for a first attempt or as a definitive selection of the number of factors: it must be less that the p number of components(variables).

According to Rencher (2002), there are four approaches to estimation of the loadings and communalities:(1) Principal Component Metdod; (2) Principal Factor Method; (3) Iterated Principal Factor Method, and (4) Maximum Likelihood Method. The two most popular methods of parameter estimation are the principal component and the maximum likelihood method. The solution from either method can be rotated in order to simplify the interpretation of factors. It is always prudent to try more than one method of solution.

Some of the purposes for which Factor Analysis can be used are (1) that the number of variables for further research can be minimized while also maximizing the amount of information in the analysis (the smaller set can be used as operational representatives of the constructs underlying the complete set of variables), (2) can be used to search data for possible qualitative and quantitative distinctions and particularly useful when the sheer amount of available data exceeds comprehensibility, and (3) if the domain of data can be hypothesized to have certain qualitative and quantitative distinctions, then this hypothesis can be tested by factor analysis.

Syntax: function [anfactpc] = anfactpc(X)
     
    Input:
         X - Data matrix. Size n-data x p-variables.
    Outputs:
         Complete Factor Analysis Results such as:
           - Table of the Extraction of Components.
           - Table of Unrotated Principal Components of the Factor Analysis.
           - Proportion of Total (standardized) Sample Variance.
           - Table of Cumulative Proportion of Total (standardized) Sample Variance.
         Optionally:
           - Table of Varimax Rotated Principal Components of the Factor Analysis.
           - Pair-wise Unrotated Factor Score Plots.
           - Pair-wise Varimax Rotated Factor Score Plots.
           - Object labels.
           - Residual Matrix.

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
10 Apr 2006 Martin Solich

A viable alternative to this estimation can be the iterated principal factor method with the lower demands of multivariate normality.

10 Apr 2006 Lukas Malec

The excellent another solution of factor analysis with the extensive application in air-pollution problems.

10 Apr 2006 Ilona Paskova

A very inspiring m-file which opens the question of another factor extracting than the maximum likelihood method.

12 May 2006 VLADIMIR CUDRIS

the best that i can find

Please login to add a comment or rating.
Updates
04 Apr 2006

It was added an appropriate format to cite this file.

05 Apr 2006

Text was improved.

Tag Activity for this File
Tag Applied By Date/Time
statistics Antonio Trujillo-Ortiz 22 Oct 2008 08:21:13
probability Antonio Trujillo-Ortiz 22 Oct 2008 08:21:13
factor analysis Antonio Trujillo-Ortiz 22 Oct 2008 08:21:13
principal components method Antonio Trujillo-Ortiz 22 Oct 2008 08:21:13
principal components method Peter 17 Sep 2010 08:56:59
factor analysis Peter 17 Sep 2010 08:57:04
probability Peter 17 Sep 2010 08:57:07

Contact us at files@mathworks.com