Bug 16678 - adf.test() fails for less than 7 values
Summary: adf.test() fails for less than 7 values
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Add-ons (show other bugs)
Version: R 3.2.2
Hardware: x86_64/x64/amd64 (64-bit) Windows 64-bit
: P5 major
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2016-01-21 11:09 UTC by Parag Ray
Modified: 2016-01-21 11:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Parag Ray 2016-01-21 11:09:04 UTC
Following code fails for length of x upto 6.
library(tseries)
x<-c(1,3,5,2,4,5)
suppressWarnings(adf.test(x)) 

throws following error,-
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 

Expected result is similar to(obtained for x<-c(1,3,5,2,4,5,7)),-
	Augmented Dickey-Fuller Test

data:  x
Dickey-Fuller = -1.3583, Lag order = 1, p-value = 0.8168
alternative hypothesis: stationary