Hi,
I use the below code to get the principal components which satisfy the condition of min eigen to not fall below 1:
freeze(tab) all.pcomp(cov=cov, mineigen=1, eigval=eval, eigvec=evec)
Now, I want the code to determine how many principal components are extracted with this criterion. Is there a way to do it via code, rather than analysing the table per se?
Extracting Principal Components via code
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13317
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Extracting Principal Components via code
Can't you just test the length of the eval vector?
!num = @rows(eval)
!num = @rows(eval)
Follow us on Twitter @IHSEViews
Re: Extracting Principal Components via code
The length of the eval vector is always equal to the total number of variables/ Principal components. It is not dependent on the cumulative proportion that one mentions in the code.
-
- EViews Developer
- Posts: 2672
- Joined: Wed Oct 15, 2008 9:17 am
Re: Extracting Principal Components via code
Code: Select all
!numge1 = @ege(eval, @ones(eval.@rows))
Re: Extracting Principal Components via code
Thanks Glenn! Works perfect
Who is online
Users browsing this forum: No registered users and 33 guests