Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/regression_models.R

Estimation of an AR(1) model.

1 2 |

`y` |
For the case of |

`method` |
This can be either "cmle" for conditional maximum likelihood or "yw" for the Yule-Walker equations. |

Instead of the classical MLE for the AR(1) model which requires numerical optimsation (Newton-Raphson for example) we estimate the parameters of the AR(1) model using conditional maximum likelihood. This procedure is described in Chapter 17 in Lee (2006). In some, it assumes that the first observation is deterministic and hence conditioning on that observation, there is a closed form solution for the parameters. The second alternative is to use the method of moments and hence the Yule-Walker equations.

`param` |
For the case of |

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

http://econ.nsysu.edu.tw/ezfiles/124/1124/img/Chapter17_MaximumLikelihoodEstimation.pdf

```
rm.lines, varcomps.mle, rm.anovas
```

1 2 3 4 5 6 7 8 9 |

```
Loading required package: Rcpp
Loading required package: RcppZiggurat
constant phi sigma
0.7859809 0.6710498 0.2039206
Call:
ar(x = y, aic = FALSE, order.max = 1, method = "ols")
Coefficients:
1
0.586
Intercept: 0.006234 (0.06551)
Order selected 1 sigma^2 estimated as 0.2016
mean phi sigma
2.4000000 0.5755245 0.2079007
Call:
ar(x = y, aic = FALSE, order.max = 1, method = "yw")
Coefficients:
1
0.5755
Order selected 1 sigma^2 estimated as 0.2079
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.