scree_type_ar {beyondWhittle} | R Documentation |
Negative log AR likelihood values for scree-type plots
Description
(Approximate) negative maximum log-likelihood for for different autoregressive orders to produce scree-type plots.
Usage
scree_type_ar(data, order.max, method = "yw")
Arguments
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 |
Details
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.
Value
a data frame containing the autoregressive orders p
and the corresponding negative log likelihood values nll
References
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>
Examples
## 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)