Hi regarding PCA I hope to transform the scores back to original data format using the top 3 PCs
I am quite new to the software (version 7) and am not aware that there is a function for this
Instead I was hoping to multiply the scores by the inverse the eigenvector matrix but the answer didnt look quite right (I transpose both the eigenvector matrix and the score matrix produced by the PCA function. I believe this is right?)
I am guessing that this is because operations has been done before PCA produce the eigenvector and scores (centering etc.)
Any tips on this? Thank you very much.
PCA  Getting back to orginal data
Moderators: EViews Gareth, EViews Moderator

 EViews Developer
 Posts: 2627
 Joined: Wed Oct 15, 2008 9:17 am
Re: PCA  Getting back to orginal data
There's a make principal components scores proc off of a group.
Re: PCA  Getting back to orginal data
EViews Glenn wrote:There's a make principal components scores proc off of a group.
Hi Thanks for the reply.
Did you mean I could create the scores?
If so I have created the scores already. I am looking to going back to the original data using only PC 1 2 3
i.e. Let S = scores, E = eigenvector matrix, X = data
I got S = EX and I am hoping to get X = E^(1)S but only using PC 1 2 3 rather than the whole E.
Thanks again

 EViews Developer
 Posts: 2627
 Joined: Wed Oct 15, 2008 9:17 am
Re: PCA  Getting back to orginal data
Tell EViews to retain only the first three components when you make the scores. See the docs for more details.
Re: PCA  Getting back to orginal data
EViews Glenn wrote:Tell EViews to retain only the first three components when you make the scores. See the docs for more details.
Hi thanks for the reply
The issue I am facing is after i created the matrix E with full eigenvectors / components, E^(1)S did not produce the orignial data so I would imagine that doing E^(1)S with PC 1 2 3 would not give the right answer neither
I am guessing that the original data had some operation done on it (e.g. centering etc.) so E^(1)S would only give the modified original data, if you see what I mean. In a sense I am wondering if there is anyway to undo those operations after E^(1)S.
Thanks and sorry I did not make myself clear.

 Posts: 202
 Joined: Tue Jul 17, 2012 9:47 am
Re: PCA  Getting back to orginal data
I have also been wondering about this and cannot quite decipher the official EViews documentation (and accompanying theory): If I am not mistaken, the default .makepcomp(cov=corr) means EViews automatically standardizes the loadings, meaning we don't have to do something like:
in a preamble to the .makepcomp command. However,if we were specifying the covariance option 'cov=cov', this would be necessary. Is that correct?
Thanks as always for clearing up my confusion!
Charlie
Code: Select all
variable@mean(variable)/@stdev(variable)
in a preamble to the .makepcomp command. However,if we were specifying the covariance option 'cov=cov', this would be necessary. Is that correct?
Thanks as always for clearing up my confusion!
Charlie

 EViews Developer
 Posts: 2627
 Joined: Wed Oct 15, 2008 9:17 am
Re: PCA  Getting back to orginal data
makepcomp mimics whatever the original transformation was in order to do the computation, since that is what the eigenvalues/vectors are dependent on. If you are doing correlations, then we first standardize prior to computing the scores. For covariances, we'll demean but not scale since the computation of the components is unscaled.
What we say in the docs is...
What we say in the docs is...
Code: Select all
...EViews will transform the Y to match the data used in the original computation. For example, the data will be scaled for analysis of correlation matrices, and partialing will remove means and any conditioning variables. Similarly, if the preliminary analysis involves Spearman rankorder correlations, the data are transformed to ranks prior to partialing.
Return to “General Information and Tips and Tricks”
Who is online
Users browsing this forum: No registered users and 2 guests