Displaying 20 results from an estimated 200000 matches similar to: "How to do ADF test and KPSS test in R"
2005 Mar 14
2
confidence level of kpss test
Dear All,
I am trying to use kpss.test function so as to perform a stationarity test on a data sample. Is it possible to know the associated confidence level for this test? I have not seen any arguments related to it.
I had a look at some other tests included in R (adf.test, pp.test, ks.test ...) and I could not find this information for them.
Thanks in advanced. Kind regards,
Belén
2007 Dec 08
2
time series tests
Hi all,
Can anyone clear my doubts about what conclusions to take with the following what puts of some time series tests:
> adf.test(melbmax)
Augmented Dickey-Fuller Test
data: melbmax
Dickey-Fuller = -5.4075, Lag order = 15, p-value = 0.01
alternative hypothesis: stationary
Warning message:
p-value smaller than printed p-value in: adf.test(melbmax)
2004 Oct 13
4
incomplete function output
Dear R users,
I have a function (below) which encompasses several tests.
However, when I run it, only the output of the last test is
displayed. How can I ensure that the function root(var)
will run and display the output from all tests, and not
just the last one?
Thank you,
b.
root <- function(var)
{
#---Phillips-Perron
PP.test(var, lshort = TRUE)
PP.test(var, lshort = FALSE)
2007 Oct 24
0
Different results in the unit root test. Why?
Situation:
I had tired a 1000-data generated by random error(i.i.d.), then I sub it
into different unit root tests. I got different results among the tests. The
following are the test statistics I got:
adf.test @ tseries ~ -10.2214 (lag = 9)
ur.df @ urca ~ -21.8978
ur.sp @ urca ~ -27.68
pp.test @ tseries ~ -972.3343 (truncation lag =7)
ur.pp @ urca ~ -973.2409
ur.kpss @ urca ~ 0.1867
kpss.test @
2006 Jul 06
2
KPSS test
Hi,
Am I interpreting the results properly? Are my conclusions correct?
> KPSS.test(df)
---- ----
KPSS test
---- ----
Null hypotheses: Level stationarity and stationarity around a linear trend.
Alternative hypothesis: Unit root.
----
Statistic for the null hypothesis of
level stationarity: 1.089
Critical values:
0.10 0.05 0.025 0.01
0.347 0.463
2008 Jan 10
1
question regarding kpss tests from urca, uroot and tseries packages
Hi R users!
I've come across using kpss tests for time series analysis and i have a question that troubles me since i don't have much experience with time series and the mathematical part underlining it.
x<-c(253, 252, 275, 275, 272, 254, 272, 252, 249, 300, 244,
258, 255, 285, 301, 278, 279, 304, 275, 276, 313, 292, 302,
322, 281, 298, 305, 295, 286, 327, 286, 270, 289, 293, 287,
2006 Aug 28
1
Help on function adf.test
Hello everybody,
I've got a matrix called EUROPEDATA and I want to calculate the adf test statistic (part of the tseries package) on a rolling basis for window my.win on each column; i.e. each column of EUROPEDATA represents a particular variable; for the first column I calculate the adf test statistic for window my.win = 60 for example, roll forward one observation, calculate the adf
2005 Mar 08
2
The null hypothesis in kpss test (kpss.test())
is that 'x' is level or trend stationary. I did this
> s<-rnorm(1000)
> kpss.test(s)
KPSS Test for Level Stationarity
data: s
KPSS Level = 0.0429, Truncation lag parameter = 7,
p-value = 0.1
Warning message:
p-value greater than printed p-value in:
kpss.test(s)
My question is whether p=0.1 is a good number to
reject
N0? On the other hand, I have a
2005 May 02
1
Trying to understand kpss.test() in tseries package
I'm trying to understand how to use kpss.test() properly. If I have a
level stationary series like rnorm() in the help page, shouldn't I get a
small p-value with the null hypothesis set to "Trend"? The (condensed)
output from kpss.test() for the two possible null hypotheses is given
below. I don't see any significant difference between these results.
> x <-
2008 Dec 08
1
About adf.test
Dear sir,
I am a new user of R statistical package. I want to perform
adf.test(augmented dickey fuller test), which packages I need to install in
order to perform it. I am getting following message on my monitor.
*x<-rnorm(1000)
> adf.test(x)
Error: could not find function "adf.test"
*I am waiting for your response.
Kamlesh Kumar.
--
Kamlesh Kumar
Appt. No. - QQ420,
2005 Mar 09
1
about kpss.test()
Hi All,
First of all, could you tell me what the "KPSS Level"
in the output of the test means?
I have a series, x, of periodic data and tried
kpss.test() on it to verify its stationarity. The
tests
gave me the p-value above 0.1. Since the null
hypothesis N0 is that the series _is_ stationary, this
means that I cannot reject N0. But the series does
look
periodic!
So does all this
2008 May 31
0
KPSS test - Lag selection
Hello everyone!
Quite a similar question has been posed here some time ago, but there was no
explicit solution offered. So I hope that it is OK to pose it again.
I want to perform a KPSS test using the packages "urca" or "tseries". But I
neither want to use the predefined lag structures, "short" and "long", nor
specify the number of lags arbitrarily by
2005 Sep 14
0
adf test and cross-correlation with missing values
Dear List,
I have multiple time series, all of which (excepting 1) have missing
values. These run for ~30 years, with monthly sampling. I need to
determine stationarity, and have tried to use the Augmented Dickey-Fuller
test (adf.test), but this cannot handle missing values. The same problem
occurs when attempting cross-correlation (ccf).
Could someone please suggest any suitable functions in
2004 Mar 26
0
Package update: 'urca' version 0.3-3
Dear R-list member,
an update of package 'urca' has been uploaded to CRAN (Mirror: Austria).
In the updated release unit root and cointegration tests encountered in
applied econometric analysis are implemented. The package is written in
'pure' R and utilises S4 classes.
In particular, the Johansen procedure with likelihood ratio tests for the
inclusion of a linear trend,
2007 Feb 13
1
lag orders with ADF.test
Hello!
I do not understand what is meant by:
"aic" and "bic" follow a top-down strategy based on the Akaike's and Schwarz's information criteria
in the datails to the ADF.test function. What does a "top-down strategy" mean? Probably the respective criterion is minimized and the mode vector contains the lag orders at which the criterion attains it
2009 Jun 09
1
Using ADF.Test
Hi,
I am quite new to R and would appreciate some guidance, if possible.
I have imported a csv file: spread <- read.csv("Spread.csv")
I get the following error when I try to run adf.test:
> adf.test(spread,alternative = c("stationary", "explosive"),0)
Error in embed(y, k) : 'x' is not a vector or matrix
Why is this?
--
View this message in context:
2013 Apr 30
1
ADF test --time series
Hi all,
I was running the adf test in R.
CODE 1:
adf.test(data$LOSS)
Augmented Dickey-Fuller Test
data: data$LOSS
Dickey-Fuller = -1.9864, Lag order = 2, p-value = 0.5775
alternative hypothesis: stationary
CODE 2:
adf.test(diff(diff(data$LOSS)))
Augmented Dickey-Fuller Test
data: diff(diff(data$LOSS))
Dickey-Fuller = -6.9287, Lag order = 2, p-value = 0.01
alternative
2009 Jun 05
1
ADF test
Hi,
While doing the ADF test in R using the following command I am getting the
error and the result..">
x.ct=ur.df(rev$REVENUE,start=1,end=length(rev$REVENUE),frequency=1)
Error in ur.df(rev$REVENUE, start = 1, end = length(rev$REVENUE), frequency
= 1) :
unused argument(s) (start = 1, end = 4, frequency = 1)
>
2010 Feb 17
0
adf.test help
Hi,
I am trying to test whether a series is return series stationary, but
before proceeding I wanted to make sure I understand correctly how to
use the adf.test function and interpret its output... Could you please
let me know whether I am correct in my interpretations?
ex: I take x such as I know it doesn't have a unit root, and is
therefore stationary
1/
> x <- rnorm(1000)
>
2007 Feb 13
0
adf test: trend, no drift - rep: invalid 'times' argument
Hello!
I am applying the ADF.test function from package uroot to a time series of data. When I apply the full test, incorporating drift and trend terms, the regressor estimate of the drift term is not significantly different from zero. So I apply the test to a model without drift term, with deterministic trend only. But then I always get the following error: