I have run the ADF test (using ur.df from the urca package) on my multivariate zoo object. Now the results are stored in a large list, when I use the show() function, there are too many results reported:
$Company_A
###############################################################
# Augmented Dickey-Fuller Test Unit Root / Cointegration Test #
###############################################################
The value of the test statistic is: -0.5293
$Company_B
###############################################################
# Augmented Dickey-Fuller Test Unit Root / Cointegration Test #
###############################################################
The value of the test statistic is: -0.4645
This goes on for several hundred companies and analyzing the output manually would take far too much time, so I would like to simplify the process.
I have found out from other posts that I can directly access the test-statistic of an individual company with the following code:
show(data$Company_A@teststat)
Now I would like to combine this function with the sapply function to quickly retrieve all test-statistics from the results of the ADF test. I've tried the following code:
sapply(data, show, teststat)
sapply(data, show, @teststat)
Both of which unforunately only return errors (first one says "object teststat not found" and second one says "unexpected @ in sapply").