Static factor analysis
res=fac_pca(arg1,...,argn)
* arg1,...,argn = arguments which can be:
- time series
- a real (nxp) vector
- a string equal to the name of a time series or a (nxp) real vector between quotes
- 'bai_ng =xx' if the user want to determine the number of factors with Bai-Ng information criteria (ICp1,ICp2 or ICp3)
- 'snum==xx' a vector with the factors to keep (e.g [1,3,...,k]) or the maxiumum number of factors to test (here k) if bai_ng option is selected
- 'pnum==xx' number of factors to keep for results printing
- the string 'noprint' if the user doesn't want to print the results of the regression
* res = a results tlist with
- res('namex') = vector of names of the x variables
- 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') = matrx 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
- res('prests') = boolean indicating the presence or absence of a time series
- res('bounds')= if there is a timeseries in the analysis, the bounds of the regression
load(GROCERDIR+'/data/BusinessSurvey.dat'); res = fac_pca('pp','fp','gpp','gob','fob','in','pnum=6','snum=1'); // Example taken from fac_pca_d(): | ![]() | ![]() |