When performing Phase I analysis within the CPM framework for a sequence of length n, the null hypothesis of no change is rejected if D_n > h_n for some threshold h_n. Typically this threshold is chosen to be the upper alpha quantile of the distribution of D_n under the null hypothesis of no change. Given a particular choice of alpha and n, this function returns the associated h_n threshold. Because these thresholds are laborious to compute, the package contains precomputed values of h_n for alpha = 0.05, 0.01, 0.005 and 0.001, and for n < 10000.
For a fuller overview of this function including a description of the CPM framework and examples of how to use the various functions, please consult the package manual "Parametric and Nonparametric Sequential Change Detection in R: The cpm Package" available from www.gordonjross.co.uk
1 2  getBatchThreshold(cpmType, alpha, n, lambda=0.3)

cpmType 
The type of CPM which is used. Possible arguments are:

alpha 
the null hypothesis of no change is rejected if D_n > h_n where n is the length of the sequence and h_n is the upper alpha percentile of the test statistic distribution. 
n 
the sequence length the value should be calculated for, i.e. the value of n in D_n. 
lambda 
A smoothing parameter which is used to reduce the discreteness of the test statistic when using the FET CPM. See [Ross and Adams, 2012b] in the References section for more details on how this parameter is used. Currently the package only contains sequences of ARL0 thresholds corresponding to lambda=0.1 and lambda=0.3, so using other values will result in an error. If no value is specified, the default value will be 0.1. 
Gordon J. Ross gordon@gordonjross.co.uk
Hawkins, D. , Zamba, K. (2005) – A ChangePoint Model for a Shift in Variance, Journal of Quality Technology, 37, 2131
Hawkins, D. , Zamba, K. (2005b) – Statistical Process Control for Shifts in Mean or Variance Using a Changepoint Formulation, Technometrics, 47(2), 164173
Hawkins, D., Qiu, P., Kang, C. (2003) – The Changepoint Model for Statistical Process Control, Journal of Quality Technology, 35, 355366.
Ross, G. J., Tasoulis, D. K., Adams, N. M. (2011) – A Nonparametric ChangePoint Model for Streaming Data, Technometrics, 53(4)
Ross, G. J., Adams, N. M. (2012) – Two Nonparametric Control Charts for Detecting Arbitary Distribution Changes, Journal of Quality Technology, 44:102116
Ross, G. J., Adams, N. M. (2013) – Sequential Monitoring of a Proportion, Computational Statistics, 28(2)
Ross, G. J., (2014) – Sequential Change Detection in the Presence of Unknown Parameters, Statistics and Computing 24:10171030
Ross, G. J., (2015) – Parametric and Nonparametric Sequential Change Detection in R: The cpm Package, Journal of Statistical Software, forthcoming
1 2  ## Returns the threshold for n=1000, alpha=0.05 and the MannWhitney CPM
h < getBatchThreshold("MannWhitney", 0.05, 1000)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.