4
$\begingroup$

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
unleaded 0.6489256 -0.7608519
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.

$\endgroup$
6
  • $\begingroup$ 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? $\endgroup$
    – SRKX
    Apr 26, 2013 at 5:43
  • $\begingroup$ @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. $\endgroup$
    – ManInMoon
    Apr 26, 2013 at 6:11
  • $\begingroup$ Why are you trying to do this? Can my answer here help you already? $\endgroup$
    – SRKX
    Apr 26, 2013 at 7:22
  • $\begingroup$ @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. $\endgroup$
    – ManInMoon
    Apr 26, 2013 at 7:38
  • $\begingroup$ 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. $\endgroup$
    – Vince
    May 3, 2013 at 22:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.