##Simulate from an AR(1):
set.seed(123)
y <- arima.sim(list(ar=0.4), 100)
##Estimate an AR(2) with intercept as mean specification
##and a log-ARCH(4) as log-volatility specification:
myModel <- arx(y, mc=TRUE, ar=1:2, arch=1:4)
##GETS model selection of the mean of myModel:
simpleMean <- getsm(myModel)
##GETS model selection of the log-variance of simpleMean:
simpleVar <- getsv(simpleMean)
##results:
print(simpleMean)
print(simpleVar)
Run the code above in your browser using DataLab