0
$\begingroup$

It should be obvious that there is a relationship between the market price of black pepper and the market price of white pepper.

library(forecast)
library(fpp)
library(AER)

data(PepperPrice)

tseries::adf.test(PepperPrice[,'black']) # Non-stationary
tseries::adf.test(PepperPrice[,'white']) # Non-stationary

coint_lm <- tslm(PepperPrice[,'black'] ~ PepperPrice[,'white'])
summary(coint_lm)

The PO Test reveals a co-integrated relationship between the two time series.

tseries::po.test(coint_lm$model) # NOT spurious

However, when I run the KPSS test with drift and trend, the test thinks that there is a unit root in the residuals.

tseries::kpss.test(coint_lm$residuals, null="Trend") # SPURIOUS!!!!

Is the null hypothesis of no unit root being rejected due to large sample size? Or there is something going on with the null='Trend' argument?

ADF and PP tests behave fine.

tseries::adf.test(coint_lm$residuals) # NOT spurious
tseries::pp.test(coint_lm$residuals) # NOT spurious
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.