# NOT RUN {
###
### Interactive visual inspection for the sunspot data
###
data <- sqrt(as.numeric(sunspot.year))
data <- data <- data - mean(data)
screeType <- ar_screeType(data, order.max=15)
# Determine the autoregressive order by an interactive visual inspection of the scree-type plot
plot(x=screeType$p, y=screeType$nll, type="b")
p_ind <- identify(x=screeType$p, y=screeType$nll, n=1, labels=screeType$p)
print(screeType$p[p_ind])
# }
Run the code above in your browser using DataLab