Static factor analysis
res=fac_pca1(x,snum,pnum,baing,meth)
* x = a matrix of data
* snum = a vector of factors to keep (e.g. [1,...,k]) or the maximum number of factor to test (here k) if the Bai-Ng information criteria is used
* pnum = number of factors to keep for the printing of results
* baing = 'Icp1', 'ICp2', 'ICp3' or 'no' type of Bai-Ng criteria to use
* meth = 'stan' if the user wants to perform the analysis on standardized variables
* res = a results tlist with
- res('meth') = 'static factor'
- res('namex') = vector of names of the x variables
- res('x') = matrix of x data
- res('fi') = first factor selected by the user (in TS format when working with TS) it's the factor i i.e the i-th most important contributor to total variance
- res('fj') = second factor selected by the user it's the factor j i.e the j-th most important contributor to total variance and so on
- res('propor') = proportion of variance explained by each factor
- res('corr_x_f') = matrix of correlations between variables and factors default is the first five factors)
- res('loadings') = matrix of loadings (variables are in rows) (default is the first five factors)
- res('snum') = number of selected factor by the user of Bai-Ng (default is the first factor)
- res('pnum') = number of selected factor for printing results (default is the first five factors)
- res('bai_ng')= 'no','ICp1','ICp2', 'ICp3'
- res('ICpk') = value of information criteria selected for each of the number of factor tested
NOTE: can also be used as an approximate dynamic factor analysis (see Stock, J. H. and M. Watson (1998), "Diffusion Indexes", NBER Working Paper, n. 6702).
load(GROCERDIR+'/data/BusinessSurvey.dat'); y=explone(['pp','fp','gpp','gob','fob','in']) r=fac_pca1(y,1:2,2,'no','stan') // With French business survey variables, on standardized variables (option 'stan'), // calculates the first 2 factors, stores all results for these 2 factors. // The # of factors being imposed by the user, the Bai-Ng option is set to 'no'. | ![]() | ![]() |