Hello mates.
I'm trying to run a factor dynamic analysis , but I'm having a problem. I am following the step by step of paper "Dynamic Factor Analysis with STATA".
Paper's link: http://www.stata.com/meeting/2italian/Federici.pdf
However, the following problem arises:
forvalues i=1/3{
mat e`i'=J(3,1,0)
}
forvalues i=1/3{
forvalues j=1/3{
mat e`i'[`j',1]=eigenvectors[`j',`i']
}
}
local t=1
matrix ST=J(3,3,0)
forvalues i=1(558)3348 {
matrix num=J(1,1,0)
matrix C=A[`i'..(`i'+558-1),1...]
svmat C
matrix accum cov=C1-C3, deviations noconstant
matrix cov=cov/(r(N)-1)
matrix ST=ST+cov
drop C1-C3
forvalues k=1/3{
mat num = num+(e`k" * cov * e`k')
}
mat l_`t'=num/trace(cov)
mat list l_`t'
local t=`t'+1
}
too few quotes
r(132);
I believe the problem is at following command line:
mat num = num+(e`k" * cov * e`k')
Could anyone help me, please?
I'm using STATA/MP 13.0.
Best regards.
Gre Vitor
I'm trying to run a factor dynamic analysis , but I'm having a problem. I am following the step by step of paper "Dynamic Factor Analysis with STATA".
Paper's link: http://www.stata.com/meeting/2italian/Federici.pdf
However, the following problem arises:
forvalues i=1/3{
mat e`i'=J(3,1,0)
}
forvalues i=1/3{
forvalues j=1/3{
mat e`i'[`j',1]=eigenvectors[`j',`i']
}
}
local t=1
matrix ST=J(3,3,0)
forvalues i=1(558)3348 {
matrix num=J(1,1,0)
matrix C=A[`i'..(`i'+558-1),1...]
svmat C
matrix accum cov=C1-C3, deviations noconstant
matrix cov=cov/(r(N)-1)
matrix ST=ST+cov
drop C1-C3
forvalues k=1/3{
mat num = num+(e`k" * cov * e`k')
}
mat l_`t'=num/trace(cov)
mat list l_`t'
local t=`t'+1
}
too few quotes
r(132);
I believe the problem is at following command line:
mat num = num+(e`k" * cov * e`k')
Could anyone help me, please?
I'm using STATA/MP 13.0.
Best regards.
Gre Vitor
Comment