
FitARz(z, p, demean = TRUE, MeanMLEQ = FALSE, lag.max = "default")
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.
FitAR
,
FitARp
,
GetFitARz
,
GetFitARpMLE
,
RacfPlot
#First Example: Fit exact MLE to AR(4)
set.seed(3323)
phi<-c(2.7607,-3.8106,2.6535,-0.9238)
z<-SimulateGaussianAR(phi,1000)
ans<-FitARz(z,4,MeanMLEQ=TRUE)
ans
coef(ans)
## Not run: #save time building package
# #Second Example: compare with sample mean result
# ans<-FitARz(z,4)
# coef(ans)
#
# #Third Example: Fit subset ARz
# z<-log(lynx)
# FitARz(z, c(1,2,4,7,10,11))
# #now obain exact MLE for Mean as well
# FitARz(z, c(1,2,4,7,10,11), MeanMLE=TRUE)
#
# #Fourth Example: Fit subset ARz
# somePACF<-c(0.5,0,0,0,-0.9)
# someAR<-PacfToAR(somePACF)
# z<-SimulateGaussianAR(someAR,1000)
# ans=FitARz(z, c(1,5),MeanMLEQ=TRUE)
# coef(ans)
# GetFitARz(z,c(1,5))#assuming a known zero mean
# ## End(Not run)
Run the code above in your browser using DataLab