##Simulate from an AR(1):
set.seed(123)
y <- arima.sim(list(ar=0.4), 60)
##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 modelling of the mean of myModel:
simpleMean <- getsm(myModel)
##GETS modelling of the log-variance of myModel:
simpleVar <- getsv(myModel)
##results:
print(simpleMean)
print(simpleVar)
##step indicator saturation of an iid normal series:
set.seed(123)
y <- rnorm(30)
isat(y)
Run the code above in your browser using DataLab