I am using Eviews 7 on a Windows 7 machine. I am running a PCA and I want it to export principal compoenents dynamically, i.e. a loop from 1 to !F where !F is the number of principal components I need. Essentially if !F is 2 I want it to export 2 PCs, if !F is 4, 4 etc.
Code: Select all
%temp = ""
for !i = 1 to !F step 1
%temp = %temp + " " + "pc" + !i
next !i
x.pcomp(eigval=eigval_x, eigvec=eigvec_x) {%temp}