Hi Admin
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 values for country 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
how i can do this
thanks
PCA on Panel data
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: PCA on Panel data
You'll have to write a simple program to loop over the calculation for each cross-section. There are many examples of such looping on this forum and in the EViews documentation.
Re: PCA on Panel data
thanks for reply
can you please refer me to such loops
thanks
i am unalbe to find.
can you please refer me to such loops
thanks
i am unalbe to find.
Re: PCA on Panel data
Not geeting the command to save the eigen values in Excel.
how to do this .
how to do this .
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: PCA on Panel data
Code: Select all
!maxcrossid = @max(@crossid)
for !i=1 to !maxcrossid
smpl if @crossid = !i
[do your thing here]
next
-
aramibiaram
- Posts: 2
- Joined: Mon Jan 19, 2015 6:56 am
Re: PCA on Panel data
Can you explain more??????
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: PCA on Panel data
Just substitute the lines to do the pca and save the results in place of the lines
[do your thing here]
I dont' remember the syntax but I believe something like
should save the eigenvalues for the correlation matrix of the group into the vector A. For each cross-section, you'll also want to put A in a different row of a results matrix.
[do your thing here]
I dont' remember the syntax but I believe something like
Code: Select all
grp.pcomp(eigen=a)Who is online
Users browsing this forum: No registered users and 2 guests
