I am interested in fitting an ARIMAX model using R. As known, ARIMAX can be understood as a composition of ARIMA models and regression models with exogenous (independent) variables. I have a time series $Y_i$, and want to estimate the ARIMA and nonlinear coefficients. The nonlinear model is the following:
$y_i=β_0+β_1t_i+β_2d+β_3 sin(2πt_i/β_4 )+β_5 (-1^{t_i})+ε_i$, nonlinear regression with an exogenous variable. Where $t_i$ =1, 2…, 60 and
d = dummy variable with 20 0's and 40 number 1's
d=c(rep(0,20),rep(1,40))
And an ARIMA model (1,1,1) for $Y_i$. Therefore, I want to estimate simultaneously the $β_i$ and the ARIMA coefficients in order to avoid the confusion between the exogenous coefficients and ARIMA coefficients. I know that $arima()$ can deal with this formulation but, how do the nonlinear model can be set within function function?. It seems that the xreg term only deals with linear parameters.