# How replicate data using PCA

I have a set of date covering petrol prices.

My example has two columns where each row represents a sequential date.

   unleaded diesel
1   1.39     1.35
2   1.3901   1.3502
3   1.3902   1.3501
.....


I generate eigen values:

my.eigen $values [1] 7.053791e-07 9.097811e-08 $vectors
PC1        PC2
diesel   0.7608519  0.6489256


my.eigen \$values [1] 7.053791e-07 9.097811e-08

How can I produce a timeseries using the first, second or first two Components. That would give me something that replicates(but of course is different to) the original data?

I would like to plot unleaded, diesel timeseries against the "replicated" data for different inclusion of components.

-
At first glance it's difficult to see whether using PCA makes any sense here. Could you please explain what you are trying to achieve? Generate similar data? –  SRKX Apr 26 '13 at 5:43
@SRKK I understand it is possible to apply the eigenvectors to the original data (not sure of exactly how) and generate a new timeseries that looks very much like unleaded BUT is based on just a subset of the principa components. –  ManInMoon Apr 26 '13 at 6:11
Why are you trying to do this? Can my answer here help you already? –  SRKX Apr 26 '13 at 7:22
@SRKX - Yes that's exactly where I am trying to go. I have added a comment on that question - as I do not understand your final suggestion. –  ManInMoon Apr 26 '13 at 7:38
One of the main uses for PCA is to reduce the dimension of correlated data in such a way as to discover the best combination of independent vectors that can be combined linearly to explain the 'variance' of data. Normally this data set is of differences (or percentage returns) whereas in your case you may working with price levels. One works with changes as opposed to levels because the latter introduces spurious correlations into the correlation/covariance matrix one must spectrally decompose to carry out the analysis. Anyway, I can go on, but for your purposes, PCA doesnt seem necessary. –  Veeken May 3 '13 at 22:16