Learn R Programming

FitAR (version 1.94)

GetFitARpMLE: Exact MLE for subset ARp Models

Description

Uses built-in function arima to fit subset ARp model, that is, the subset model is formed by constraining some coefficients to zero.

Usage

GetFitARpMLE(z, pvec)

Arguments

z
time series
pvec
lags included in AR model. If pvec = 0, white noise model assumed.

Value

a list with components:
loglikeliihood
the exact loglikelihood
phiHat
estimated AR parameters
constantTerm
constant term in the linear regression
pvec
lags of estimated AR coefficient
res
the least squares regression residuals
InvertibleQ
True, if the estimated parameters are in the AR admissible region.

Details

Due to the optimization algorithms used by arima, this method is not very reliable. The optimization may simply fail. Example 1 shows it working but in Example 2 below it fails.

References

McLeod, A.I. and Zhang, Y. (2006). Partial Autocorrelation Parameterization for Subset Autoregression. Journal of Time Series Analysis, 27, 599-612.

McLeod, A.I. and Zhang, Y. (2008a). Faster ARMA Maximum Likelihood Estimation, Computational Statistics and Data Analysis 52-4, 2166-2176. DOI link: http://dx.doi.org/10.1016/j.csda.2007.07.020.

McLeod, A.I. and Zhang, Y. (2008b, Submitted). Improved Subset Autoregression: With R Package. Journal of Statistical Software.

See Also

FitAR, FitARz, GetFitARz, FitARp, RacfPlot

Examples

Run this code
#Example 1. MLE works
z<-log(lynx)
p<-c(1,2,4,7,10,11)
GetFitARpMLE(z, p)
#
#Example 2. MLE fails with error.
p<-c(1,2,9,12)
## Not run: GetFitARpMLE(z, p)

Run the code above in your browser using DataLab