0

I would like to use principal component analysis (PCA) to identify common components/factors of some time series. However, the data is not stationary, so I took the first difference to make sure the data is stationary. Then I did the PCA on the first difference:

prcomp(data, scale. = TRUE, center = TRUE)

But actually I'm not interested in the common components of the first difference but of the actual data. Can I use this information from the first difference to find out more about common components of the data? Or is there another way to make the data stationary?

The aim is to implement something similar to https://static.norges-bank.no/contentassets/78c009376c6548e799c27b94c036d480/working_paper_5_17.pdf on page 17f.

Thank you in advance.

Thomas Bilach
  • 4,732
  • 2
  • 6
  • 25
Feli_
  • 1
  • 1
  • Related question: ["Properties of PCA for dependent observations"](https://stats.stackexchange.com/questions/226845). – Richard Hardy Jun 12 '20 at 20:29
  • PCA applied on levels of cointegrated data is used for finding a cointegrating combination of the variables. For that, you take the **last** of the PCs. – Richard Hardy Jun 12 '20 at 20:33
  • Why should I take the last of the PCs? – Feli_ Jun 13 '20 at 08:27
  • Because it will have the least variation, which you would expect when comparing a stationary combination with any nonstationary combination of cointegrated time series. If there is a single cointegrating combination, it will be the last component. – Richard Hardy Jun 13 '20 at 08:36
  • Okay, that makes sense. But in the example in the link above he seems to choose the first four components. I'm wondering how I can construct this example. – Feli_ Jun 13 '20 at 12:41

0 Answers0