scree_type_ar | R Documentation |
(Approximate) negative maximum log-likelihood for for different autoregressive orders to produce scree-type plots.
scree_type_ar(data, order.max, method = "yw")
data |
numeric vector of data |
order.max |
maximum autoregressive order to consider |
method |
character string giving the method used to fit the model, to be forwarded to |
By default, the maximum likelihood is approximated by the Yule-Walker method, due to numerical stabililty and computational speed. Further details can be found in the simulation study section in the referenced paper.
a data frame containing the autoregressive orders p
and the corresponding negative log likelihood values nll
C. Kirch et al. (2018) Beyond Whittle: Nonparametric Correction of a Parametric Likelihood With a Focus on Bayesian Time Series Analysis Bayesian Analysis <doi:10.1214/18-BA1126>
## Not run:
###
### Interactive visual inspection for the sunspot data
###
data <- sqrt(as.numeric(sunspot.year))
data <- data <- data - mean(data)
screeType <- scree_type_ar(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])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.