Why the instructor is importing ARMA while explaining the concept of AR models. I think there is some mistake done on your part. Please clarify.
Is this problem related to some older versions of packages?
There exist AR and MA functions, but the general consensus is to try and use the same function as much as possible, so that we ensure we get consistent results.
Since the ARMA(p,0) = AR(p) and the ARMA(0,q) = MA(q), we’re simply using the ARMA function, since it has greater flexibility. In reality, we could have just used the SARIMAX() function from the get-to, but that would have been waaaaaay too complex and confusing. Hence, we decided to ease you in, by introducing the simplest of the “more general” functions (a.k.a functions we can use across various models).
Hope this helps!