sapply与ur.df组合
我有一个多变量时间序列(xts)对象,我想在其上使用ur.df函数sapply与ur.df组合,r,time-series,sapply,R,Time Series,Sapply,我有一个多变量时间序列(xts)对象,我想在其上使用ur.df函数 data <- read.zoo("file.csv", header=TRUE, sep=",", format="%d-%m-%y") test <- sapply(data, ur.df) data为了解决这个问题,我将转发@shadow的答案 sapply(data, ur.df, lags=10, type='trend') sapply(data,ur.df,lags=10,type='trend')
data <- read.zoo("file.csv", header=TRUE, sep=",", format="%d-%m-%y")
test <- sapply(data, ur.df)
data为了解决这个问题,我将转发@shadow的答案
sapply(data, ur.df, lags=10, type='trend')
sapply(data,ur.df,lags=10,type='trend')
great,解决了我的问题!你介意把它作为答案贴出来吗?这样我就可以批准了?
test3 <- sapply(data, ur.df(lags=10, type='trend')
test4 <-sapply(data, ur.df(data, lags=10, type='trend')
sapply(data, ur.df, lags=10, type='trend')