I am trying to fo Augment dickey -fuller test using quantmod for a class project and have following code; and get the error. Am I missing any library since I only have quantmod , please help , I am new to this and seem lost ; thanks in advance
library(quantmod)
getSymbols("AAPL")
AAPL.rtn=diff(log(AAPL$AAPL.Adjusted))
t.test(AAPL.rtn)
AAPL <- na.omit(AAPL.rtn) # removes the NAs
acf(AAPL)
m1=ar(AAPL, method='mle')
m1$order
Error in ar.mle(x, aic = aic, order.max = order.max, na.action = na.action, :
MLE only implemented for univariate series