Repository navigation
Description
trying again for an overall design or design requirements for control chart
main original issue #4191 plus 2 PRs for earlier implementation
newer topics
- control charts based on beta distribution or regression and other distributions on (0, 1) or [0, 1]
- tolerance interval, currently only for poisson stats
traditional control charts
one letter or short names, x, u, p, np, c, u, xbar, ...., based on k * sigma limits
we can add it mainly for familiarity by users
almost one liners, but it would be good to have a collection
all that is needed is mean or expected value and variance of mean
more general and more interesting components
quantiles
use quantile estimate for control limits instead of k*sigma limits
either parametric or nonparametric/flexible distribution, misspecified model (eg. over dispersion)
with or without parameter uncertainty
simple example: one sample tolerance interval for Poisson
We could compare with QuantReg or M-quantiles using less restrictive distributional assumptions.
parameter estimation using clean data
fit assuming data does not have outliers or out of control observations
This can be either simple estimators like mean, or we connect to models, e.g. beta regression, or regression control charts.
Advantage of using models is that we have built-in inference, e.g. standard errors of parameter estimates, including misspecification robust inference, and get_distribution method.
parameter estimation and outlier detection using dirty data
fit assuming historical data might have outlier, out-of-control periods
- robust estimation, currently we only have RLM, but nothing for discrete, nonlinear or link models.
- outlier identification
We have get_influence for some outlier candidate identification, but no robust estimation besides dropping outliers.
GLM has freq_weights, that we could use to adaptively downweigh outlier candidates.
We also need something for grouped outlier, e.g. several outlier periods in a row, need to look at outlier windows.
We can also reuse control chart itself iteratively to identify outliers, e.g. if we have tolerance intervals, ppf, isf, quantiles
I did not look at implementation issues again.
We could start with Poisson, tolerance interval versus k-sigma limits versus quantreg.
With overdispersion and count distributions that are alternatives to Poisson.
Example: u-chart versus Laney u' Chart (u Prime) versus NBP or GPP, versus zero-inflated, ...
u prime chart adds heterogeneity in mean across batches, (a bit similar to meta-analysis correction for random effects), e.g. empirical standard deviation versus standard deviation implied by the distribution.
https://www.qimacros.com/control-chart-formulas/u-prime-chart-formula/
more difficult multi-link or multi distribution parameter models
e.g. equivalence to tolerance interval or quantiles under parameter uncertainty for BetaModel.
Activity
josef-pkt commentedon Nov 22, 2022
meta: monitor or control the control chart
If we use control charts based on predictive distribution properties using a specific model, then we need specification testing or model comparisons to choose the model appropriate for historical data.
Similarly, we could base control charts on distributional properties other than a mean measure.
E.g. a control chart for variance is also a monitor for the mean control chart. Even if mean stays unchanged, the control limits might change, i.e. we need to monitor for changes in the control limits.
Other gof and specification measures could also be monitored to check whether the control chart and it's underlying distributional assumptions are still appropriate. Main problem is that many of those statistics require larger sample sizes, e.g. quantiles close to the tails, or higher order moments, or cdf in tails.
josef-pkt commentedon Nov 24, 2022
possible class SigmaControlChart:
generic class that uses k * sigma control charts, where sigma could be empirical or from model (poisson, binomial, normal, ...) and k is user given or ppf of standard normal.
with different chart updating (method?) types
josef-pkt commentedon Nov 24, 2022
two more on integration with models and
statswhich. What should be the api?whichfor prediction interval, e.g.predict="obs". disadvantage duplicate computation if we want confint and confint_obs2indepsamples, with null that they have the same mean. We can just call current functions directly.Add shortcut for fixed reference sample to avoid recomputing statistics for it. e.g. summary data for reference sample, full data for test sample.
Possibly or optionally, fix auxiliary parameters like variance to be only from reference sample
josef-pkt commentedon Aug 31, 2023
again, semi-random design idea
chart class (for independent, i.i.d. data, not sure what changes with cusum and emwa with moving limits):
__init__: method for control limits, optional historical data (phase 1)__init__for univariate data (y, endog), we might need extra data, e.g. sample size for xbar, binomial, exposure for Poisson, ...
plus exog for attribute charts, regression prediction intervals
choice of distribution
e.g. for count data, we could have any available model, poisson, binomial, negative binomial, zip, ...
for continuous data, we could have normal, t, ...
This is mainly relevant if we estimate control limits from quantile function, ppf (or tolerance interval)
model diagnostics:
If we estimate phase 1 parameters using a model, then returning its results would provide additional diagnostics for, e.g., goodness-of-fit.
(simplest case: Poisson count chart for individual i.i.d. observations)
(aside: if we trim outlying observations by threshold, then using truncated model would be more appropriate for estimation, e.g. tail truncated Poisson)