user2821029
user2821029

Reputation: 153

Error with ar() function in R - MLE only implemented for univariate series

I am getting an error when I try to use the AR function in R. Here is my code:

ord = ar(m2, method = "mle")

the m2 vector is 186 x 1 and contains prices.

The error I get is "MLE only implemented for univariate series"

Any ideas?

Upvotes: 0

Views: 3251

Answers (1)

nograpes
nograpes

Reputation: 18323

You have to use a vector, instead of a matrix, I think:

ar(m2[,1], method = "mle")

Upvotes: 1

Related Questions