Page 2 of 2
Re: Principal Components Analysis
Posted: Fri Jan 30, 2009 3:44 pm
by EViews Glenn
There's an option when you run programs to continue even if you get errors up to a maximum number...It's set at 1 by default, make it bigger.
Re: Principal Components Analysis
Posted: Fri Jan 30, 2009 3:52 pm
by startz
There's an option when you run programs to continue even if you get errors up to a maximum number...It's set at 1 by default, make it bigger.
This appears to be a response to
Greentea wrote:
You’re a genius!!
Steady on, it'll go to his head....I have to work with him!
Which of them do you think was committing a program error, such that more such errors should be permitted?

Re: Principal Components Analysis
Posted: Fri Jan 30, 2009 4:09 pm
by Greentea
By increasing the number, I've got my the programme working! How can I ever thank you enough!
Without exaggeration that you've made my day! Thank you!!
Re: Principal Components Analysis
Posted: Thu Feb 05, 2009 10:57 am
by Greentea
I’m afraid that I have to trouble you again about the program which you kindly helped me out last time.
Is that possible to display these 848 principal component analysis results one by one within Eviews, please? Last time, I had all the eigenvalues, eigenvectors and the ordinary correlation matrixes saved in Excel format. However, every time when I opened these Excel files, there were error messages saying that “File errors. Some number formats may have been lost.”.
Thank you very much as always!
Re: Principal Components Analysis
Posted: Thu Feb 05, 2009 4:18 pm
by Greentea
I’m afraid that I found another problem about the results of principal components analysis (PCA). Using those 2 programs which are shown in the 10th post (posted by me at 3:50 pm, Tue Jan 27, 2009 ), I only managed to get 22 eigenvalues (V1) for each of the programs. Taking the first programme for example, when I run the first programe, which is to get PCA results across years with a given firm, I should get 848*22 different V1. However, I only get one file with V1. Could you please be so kind to look into this for me, please?
Thank you!
Re: Principal Components Analysis
Posted: Fri Feb 06, 2009 1:22 pm
by Greentea
I think that I know where went wrong regarding my last post. However, could kindly lend me a hand for the post before that(to display results on screen)? Thank you!
Re: Principal Components Analysis
Posted: Fri Feb 06, 2009 2:24 pm
by EViews Glenn
I'm afraid that I don't quite understand what it is you are trying to do. What exactly do you mean by displaying the results one by one?
Re: Principal Components Analysis
Posted: Fri Feb 06, 2009 4:12 pm
by Greentea
Thank you very much for the reply and sorry for the confusion I caused. I should have given you some background information!
I think that the aim of the 1st program in post 10 is to run a Principal Component Analysis (PCA) across years with a given firm using following 20 accounting measures.
group pclevel BOOKMV CACL CASHFLOWMV CASHFLOWTA CASHFLOWTLIABILITIES CREDITORMV CREDITORTA DY FIXATA IGEAR LTBORMV LTBORRATIO OPINCOMMV TAMV SALESTA SALESMV PMTA PMMV OPM OPINCOMTA
for !firm=1 to 848
smpl if crossid = !firm
pclevel.pcomp(cor, eigval=v1, eigvec=m1) pc1 pc2 pc3 pc4 pc5
v1.write v_1{!firm}.xls
m1.write m_1{!firm}.xls
group comps pc1 pc2 pc3 pc4 pc5
write comps_{!firm}.xls comps
next
At that moment, we showed the correlation matrixes and stored the results of eigenvalues (v1s), eigenvectors(m1) and the sores(comps) onto separated Excel firms. Since I have 848 firms in my data, I have 848 different files for v1, 848 files for m1 and 848 files for comps.
I’m wondering that is it possible to display the correlation matrixes, v1s, m1 and comps company by company, please? However, the program above only displays the correlation matrixes, v1s, m1 and comps of the last company in my data on the screen. I guess perhaps there is a way to pause the program and proceed again using each firm as a unit?
Thank you very much for your help!
Re: Principal Components Analysis
Posted: Wed Feb 11, 2009 7:44 am
by EViews Glenn
Possibly the best way for you is to, instead of storing everything onto disk in your loop, put your results in a spool object. Then you can look at individual results in EViews. You'll have to look at the docs for a discussion of how to do this...
Re: Principal Components Analysis
Posted: Thu Feb 12, 2009 9:39 am
by Greentea
Thank you so much for the advice. I'll certainly look into spool object and if I face any problems, I may have to trouble you again. Thanks!
Re: Principal Components Analysis
Posted: Fri Jan 17, 2014 10:04 am
by abcd
Hi Admin
I am do the same type of analysis.
I am woring on panel data, haveing time series form 1970 to 2008. and number of countries are 30. I have to generate the PCA for each country. first of all I have to generate the eigen vales for vountry one and store them in excel and generate the eigen vlaues for country two and save them in excel below the eigean values of first country eigen values. and so on
what chages in the program i have to do
thanks
Re: Principal Components Analysis
Posted: Wed Feb 15, 2017 5:00 am
by saranya
what if I want to store only the principal components that has an eigen value greater than 1? I have mentioned something like this:
freeze(tab) all.pcomp(cor, mineigen=1, eigval=eval, eigvec=evec)
however, the eval vector still has all the principal components ( which equals the number of variables)