mosum.criticalValue | R Documentation |
Computes the asymptotic critical value for the MOSUM test.
mosum.criticalValue(n, G.left, G.right, alpha)
n |
an integer value for the length of the input data |
G.left, G.right |
integer values for the left and right moving sum bandwidth (G.left, G.right) |
alpha |
a numeric value for the significance level with
|
a numeric value for the asymptotic critical value for the MOSUM test
x <- testData(lengths = rep(100, 3), means = c(0, 5, -2), sds = rep(1, 3), seed = 1234)$x m <- mosum(x, G = 40) par(mfrow = c(2, 1)) plot(m$stat, type = "l", xlab = "Time", ylab = "", main = "mosum") abline(h = mosum.criticalValue(300, 40, 40, .1), col = 4) abline(v = m$cpts, col = 2) plot(m, display = "mosum") # identical plot is produced
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.