Determining the Number of Factors
Posted: Tue May 17, 2011 5:09 am
Hello,
I want to analyse a money demand function for a panel of countries and would like to determine the number of factors to apply the PANIC methodology proposed by Bai and Ng (2004), A PANIC attack on unit roots and cointegration. Econometrica, 72, 1127–1177. Thus, I use the RATS procedure baing.scr (with fewer features since I work with RATS 6.3) to estimate the required number of factors of the set of countries for each variable (using the formulas in Bai and Ng, "Determining the Number of Factors in Approximate Factor Models", Econometrica, 2002, vol 70, pp 191-222).
First of all, I am not sure whether I have to define the original (differenced)* variables as matrix x or already estimated factors (using principal component analysis) or even both (I attach both as xls-file).
(Parameters: x = nper x nvar matrix of data. The factors are nper x 1 vectors)
Further, even though there are no error messages I get no output as I would expect from the code:
report(action=define)
report(atrow=1,atcol=1,align=center) "Factors" "PCP1" "PCP2" "ICP1" "ICP2"
report(atrow=2,atcol=1,fillby=cols) %seq(1,max)
report(atrow=2,atcol=2) stats
report(action=format,atcol=2,tocol=2,tag=min,special=onestar)
report(action=format,atcol=3,tocol=3,tag=min,special=onestar)
report(action=format,atcol=4,tocol=4,tag=min,special=onestar)
report(action=format,atcol=5,tocol=5,tag=min,special=onestar)
report(action=format,atrow=2,atcol=2,picture="*.#####",align=decimal)
report(action=show)
What might be the problem(s)?
Thanks in advance!
Frauke
*Following the PANIC methodology proposed by Bai and Ng (2004) I want to apply the method of principal components to the first differenced data.
I want to analyse a money demand function for a panel of countries and would like to determine the number of factors to apply the PANIC methodology proposed by Bai and Ng (2004), A PANIC attack on unit roots and cointegration. Econometrica, 72, 1127–1177. Thus, I use the RATS procedure baing.scr (with fewer features since I work with RATS 6.3) to estimate the required number of factors of the set of countries for each variable (using the formulas in Bai and Ng, "Determining the Number of Factors in Approximate Factor Models", Econometrica, 2002, vol 70, pp 191-222).
First of all, I am not sure whether I have to define the original (differenced)* variables as matrix x or already estimated factors (using principal component analysis) or even both (I attach both as xls-file).
(Parameters: x = nper x nvar matrix of data. The factors are nper x 1 vectors)
Further, even though there are no error messages I get no output as I would expect from the code:
report(action=define)
report(atrow=1,atcol=1,align=center) "Factors" "PCP1" "PCP2" "ICP1" "ICP2"
report(atrow=2,atcol=1,fillby=cols) %seq(1,max)
report(atrow=2,atcol=2) stats
report(action=format,atcol=2,tocol=2,tag=min,special=onestar)
report(action=format,atcol=3,tocol=3,tag=min,special=onestar)
report(action=format,atcol=4,tocol=4,tag=min,special=onestar)
report(action=format,atcol=5,tocol=5,tag=min,special=onestar)
report(action=format,atrow=2,atcol=2,picture="*.#####",align=decimal)
report(action=show)
What might be the problem(s)?
Thanks in advance!
Frauke
*Following the PANIC methodology proposed by Bai and Ng (2004) I want to apply the method of principal components to the first differenced data.