Computes and returns a p-value for the result of a parametric Monte Carlo test. Optionally, plots a histogram of the test statistics (on the original data, and using test statistics resulting from simulations from the null hypothesis distribution).
plotBS(BS, alpha = 0.05, plot = TRUE, verbose = FALSE, main = "Bootstrap Histogram",
xlab = "Test Statistic Values", ylab = "Frequency")
The p-value computed from the Monte Carlo test results is returned
The results from a Monte Carlo test. This should be a vector of arbitrary length. The first value must be the value of the test statistic computed on the data. The remaining values are the test statistics computed on simulations constructed under the null hypothesis.
A nominal size for the test. This only effects the reporting.
If the computed p-value is less than alpha
then the function
prints out that the series is not stationary.
If TRUE
then a histogram of all the test statistics
is produced, with a vertical line showing the position of the test
statistic computed on the actual data. If the vertical line is much
larger than all the histogram values then this is indicative of
stationarity. If the vertical line is well within the histogram
values then this is indicative of no evidence against stationarity.
If TRUE
then the p-value is printed and a sentence
declaring "stationary" or "not stationary" is printed (relative
to the nominal p-value)
A main
label for the plot, if produced
An xlab
x axis label for the plot, if produced
An ylab
y axis label for the plot, if produced
Guy Nason
Cardinali, A. and Nason, Guy P. (2013) Costationarity of Locally Stationary Time Series Using costat. Journal of Statistical Software, 55, Issue 1.
Cardinali, A. and Nason, G.P. (2010) Costationarity of locally stationary time series. J. Time Series Econometrics, 2, Issue 2, Article 1.
getpvals
,BootTOS
#
# See example in \code{\link{BootTOS}}.
#
Run the code above in your browser using DataLab