I have a problem in understanding how the `init`

and `fixed`

parameters are specified in the `arima`

function in R.

For example, I will use R's built-in dataset `lh`

to illustrate the idea:

The line below works fine

```
arima(lh, order = c(1,0,0))
```

But this line does not work as expected and generated the error message below:

```
arima(lh, order = c(1,0,0), init=c(0.17))
Error in arima(lh, order = c(1, 0, 0), init = c(0.17)) :
'init' is of the wrong length
```

Since I am specifying an ARMA(1,0) model, `init`

should only take one parameter. Then why is this not working ? What are the "model parameters" expected for `init`

? This is really confusing.

I encounter the same problem with the `fixed`

parameters in `arima`

as well. I believe they are actually the same problem. So, if one of them is solved, the other is also automatically solved as well.

# Best How To :

Please read the documentation carefully. `help(arima)`

clearly tells you that `init`

relates to the initial values of **parameters**:

`init`

optional numeric vector of initial **parameter** values. Missing values will be filled in, by zeroes except for regression coefficients. Values already specified in fixed will be ignored.

Similarly, `fixed`

also relates to **parameters**:

`fixed`

optional numeric vector of the same length as the total number of parameters. If supplied, only NA entries in fixed will be varied. transform.pars = TRUE will be overridden (with a warning) if any AR parameters are fixed. It may be wise to set transform.pars = FALSE when fixing MA parameters, especially near non-invertibility.

Note that what you think you are passing as initial values Y_{0}, Y_{-1}, ... are taken from the actual values of the series itself.

Try calling `coef`

on the return of

```
arima(lh, order = c(1,0,0))
```

to see how many parameters you are are likely to need to initialize.