I would suggest:
1 test for unit root:
if unit root: stochastic trend
if not: 2
2 test for trend in normal AR(MA) model
if not trend: "pure stationary" as you call
if trend: trend stationary
Note if just the question of trend is of interest for you, you might be
interested in using a test for trend indeopendeant of I(1)/I(0). Such a
test has been developed in:
David I. Harvey, Stephen J. Leybourne, A.M. Robert Taylor
A simple, robust and powerful test of the trend hypothesis, J
Econometrics 2007, 1302-1330
Mat
Le 20. 01. 11 07:48, Mark Breman a écrit :
Thanks Paul, you are right; if the trend is stronger it's revealed by the
adfTest.
As a follow-up question:
Does anyone know if a test exists that would reveal a weaker trend in the
data?
Regards,
-Mark-
2011/1/19 Paul Teetor<[email protected]>
Mark,
The adfTest with type="nc" works for me. I think your trend time series is
not "trendy" enough. When I change the assignment statement to this:
trend=notrend+(row(notrend)*.4) # Change 0.04 to 0.4
and execute this:
adfTest(coredata(trend), lag=0, type='nc')@test$p.value
I get a p-value of 0.98.
Paul Teetor, Elgin, IL USA
http://quanttrader.info/public
------------------------------
*From:* Mark Breman<[email protected]>
*To:* [email protected]
*Sent:* Wed, January 19, 2011 4:38:56 AM
*Subject:* [R-SIG-Finance] Howto test for true stationarity with adfTest()
Hi everyone,
I want to test for true stationarity (not trend-stationarity) in my
timeseries. I understand that i can't use the adf.test(), because it
de-trends the series.
Indeed, i can verify this:
notrend=xts(rnorm(100), Sys.Date()-100:1)
trend=notrend+(row(notrend)*.04)
adf.test(coredata(notrend), alternative="stationary", k=0)$p.value
[1] 0.01
adf.test(coredata(trend), alternative="stationary", k=0)$p.value
[1] 0.01
The p-values are the same so it's not usable for my purpose.
I'm told i can use the adfTest() from package fUnitRoots instead because
this test does not de-trend the series.
So i try:
library(fUnitRoots)
adfTest(coredata(notrend), lag=0, type='c')@test$p.value
0.01
adfTest(coredata(trend), lag=0, type='c')@test$p.value
0.01
Again, the p-values are the same!? Changing the type parameter (to 'ct' or
'nc') does not help either (it gives the same p-values).
What am i doing wrong here?
Thanks,
-Mark-
[[alternative HTML version deleted]]
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions
should go.
[[alternative HTML version deleted]]
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.