Principal Component

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

MartinF
Posts: 4
Joined: Wed Oct 15, 2008 1:56 am

Principal Component

Postby MartinF » Wed Oct 29, 2008 6:45 am

Hello,

I want to greate a pseudo out of sample forecast with principal component analysis. Because of this I need a comand to extract the components, after fiting. If I want to get the fit of an normal equation, then I use this way...

equation ar1.ls inflation c inflation(-1)
ar1.fit inflation_hat inflation_se
series inf_hat=inflation_hat

So, fist estimate the principal components and second extract the component one, two, three... as an series.

Is this possible???

Best Regards
Martin

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: Principal Component

Postby EViews Glenn » Wed Oct 29, 2008 9:12 am

To perform this operation interactively, select the Proc/Make Principal Components entry from the group menu (see User's Guide I, p. 403) and fill out the resulting dialog. Simply choose your normalization method and enter a name for each component score series you wish to save (the first component score will be saved into the first name provided, the second into the second name, etc.)

To extract the component scores using a command you should use the makepcomp procedure of a group. For example, if GRP1 has three series X1, X2, and X3, then the command

Code: Select all

grp1.makepcomp comp1

will place the first component scores computed using the default normalization (normalized loadings, scores have variances equal to the eigenvalue) in the series COMP1. You can use options to change the normalization, etc. Additional details are provided in the Command Reference.

MartinF
Posts: 4
Joined: Wed Oct 15, 2008 1:56 am

Re: Principal Component

Postby MartinF » Thu Oct 30, 2008 1:35 am

Thank You for answering my requery. I will try it :-)

MartinF


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 15 guests