Principal component analysis on a matrix

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

PMaier
Posts: 36
Joined: Sat Sep 11, 2010 10:12 am

Principal component analysis on a matrix

Postby PMaier » Wed Feb 01, 2012 1:06 pm

Hi,

I'd like to use principal component analysis on a matrix and retrieve the scores.

I can use

matrixname.pcomp(eigval=v1, eigvec=m1)

to calculate the eigenvalues and eigenvectors, but there doesn't seem to be a command to calculate the scores -- although when I use the dialog box, I can store them in a series, so the capability is there.

Put differently, if my matrix were a group object, I'd use

groupname.makepcomp

and I'm assuming that there is a similar command for matrices, too?

Many thanks, Philipp

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: Principal component analysis on a matrix

Postby EViews Gareth » Wed Feb 01, 2012 2:32 pm

Code: Select all

matrix.makepcomp(score=myname) 3
saves the first 3 scores in a matrix called myname.

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

Re: Principal component analysis on a matrix

Postby EViews Glenn » Wed Feb 01, 2012 2:39 pm

The reason for the difference is that the matrices are not generally the same size as a workfile so that the scores can't be put into a set of series as in the group case. Thus, we allow you to save them into a matrix.

PMaier
Posts: 36
Joined: Sat Sep 11, 2010 10:12 am

Re: Principal component analysis on a matrix

Postby PMaier » Wed Feb 01, 2012 2:47 pm

Gareth,

You made my day.

Philipp

PS I don't think it's in the manual -- if that's correct, it might be worth adding for the next iteration.

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

Re: Principal component analysis on a matrix

Postby EViews Glenn » Wed Feb 01, 2012 4:06 pm

I believe you are correct. On both counts.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests