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) > rev$REVENUE.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) > plot(rev$REVENUE.ct) Error in plot.window(...) : need finite 'xlim' values In addition: Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) : no non-missing arguments to max; returning -Inf 3: In min(x) : no non-missing arguments to min; returning Inf 4: In max(x) : no non-missing arguments to max; returning -Inf > library(tseries) > adf.test(REVENUE,alternative="explosive",k=0) Error in NCOL(x) : object 'REVENUE' not found > adf.test(rev$REVENUE,alternative="explosive",k=0) Error in if (interpol == min(tablep)) warning("p-value smaller than printed p-value") else warning("p-value greater than printed p-value") : missing value where TRUE/FALSE needed > summary(ur.df(rev$REVENUE,lags=0,type="trend") + )
############################################### # Augmented Dickey-Fuller Test Unit Root Test # ############################################### Test regression trend Call: lm(formula = z.diff ~ z.lag.1 + 1 + tt) Residuals: ALL 3 residuals are 0: no residual degrees of freedom! Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 171.522 NA NA NA z.lag.1 -5.579 NA NA NA tt 3.459 NA NA NA Residual standard error: NaN on 0 degrees of freedom Multiple R-squared: 1, Adjusted R-squared: NaN F-statistic: NaN on 2 and 0 DF, p-value: NA Value of test-statistic is: NaN NaN NaN Critical values for test statistics: 1pct 5pct 10pct tau3 -4.38 -3.60 -3.24 phi2 8.21 5.68 4.67 phi3 10.61 7.24 5.91 " Can anyone tell me what is wrong with the codes???The code used is given below. Thanx t=1:length(x) plot(t,x) trend = lm(x~t) abline(lm(x~t)) summary(trend) library(urca) x = ts(x, start=1, end = length(x), frequency=1) x.ct = ur.df(x,lags=0,type='trend') plot(x.ct) library(tseries) adf.test(x,alternative = "explosive" , k=0) summary(ur.df(x,lags=0,type='trend') [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.