# How to do the RESET test on an AR model?

> library("lmtest")
> a = arima.sim(list(ar = c(.05, -.05)), 1000)
> b = arima(a, order = c(2, 0, 0))
> resettest(b)
**Error in terms.default(formula) : no terms component nor attribute**


Question 1. What I am doing is shown above. What should I do about that? (I have tried to put in type, data and power parameter at resettest(), result is the same.)

Question 2.If I want to do the same thing on the model below

which is a ar(2) model plus , how to fit this nonlinear model (by using R, thank you!)?

• I am sorry if these questions are way too fundamental :( New on this field. – recon Apr 3 '19 at 13:33
• Seems it s an unpopular field :) guys plz! if you just passed by and know someone who is good at this field, feel free to tag them! thank you so much! – recon Apr 4 '19 at 7:05