Quantcast
Channel: EViews
Viewing all articles
Browse latest Browse all 24142

Extract k principal coomponents

$
0
0
Hi everyone

I would like to create all principal components representing 0.95 of the cumulative proportion of variance explained (PCA).

This is what I have so far where CFP01 is the group name of a number of underlying series.

Code:

%m= "cfp01"    
freeze(table01) {%m}.pcomp(cproport = 0.95, out=table)
!n = @val(@wright(@wleft(table01(6,1),2),1))
For !i = 1 to !n
    %str1 = %str1 + "F" + @str(!i) + " "
next
{%m}.makepcomp(scale=normscore, cpnorm) %str1


The input for the vector names is not a string. The code does not recognise the empty space as a delimiter. Please advise

Thanks



Viewing all articles
Browse latest Browse all 24142


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>