stest | R Documentation |
This is a wrapper for three functions from tseries
package. Augmented Dickey-Fuller (ADF, adf.test
), Phillips-Perron (PP, pp.test
) and Kwiatkowski-Phillips-Schmidt-Shin (KPSS, kpss.test
) tests for stationarity are performed.
stest(data)
data |
|
matrix
,
tests statistics and p-values are given by columns,
tests outcomes for different variables are ordered by rows
wti <- crudeoil[-1,1]
drivers <- (lag(crudeoil[,-1],k=1))[-1,]
ld.wti <- (diff(log(wti)))[-1,]
ld.drivers <- drivers[-1,]
ld.drivers[,c(4,6)] <- (diff(drivers[,c(4,6)]))[-1,]
ld.drivers[,c(1:2,5,7)] <- (diff(log(drivers[,c(1:2,5,7)])))[-1,]
ld.drivers[,c(3,6)] <- ld.drivers[,c(3,6)]/100
x <- cbind(ld.wti,ld.drivers)
stest(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.