You are here: Symbol Reference > StatControlCharts Namespace > Functions > StatControlCharts.QCCumSumChart Function
Stats Master VCL
ContentsIndex
Example

Perform CumSum QC to determine if process is out-of-control.

var h,k,m,s: double;
  data: Matrix;
  sh,sl, s: Vector;
  outofcontrol: VectorInt;
begin
  data.LoadFromFile('process_data.mtx');
  // estimate k=0.32, h = 4.7
  k := 0.32;
  h := 4.7;
  // estimate process mean and sigma
  m := 230.3;
  s := 5.2;
  QCCumSumChart(data,s,k,h,m,s,sh,sl);
  // find point indexes which exceed h (out-of-control points)
  outofcontrol.FindIndexes(sh,'>',h);
end;
#include "MtxExpr.hpp"
#include "MtxExprInt.hpp"
#include "StatControlCharts.hpp"
void __fastcall Example();
{
  sMatrix data;
  data.LoadFromFile("process_data.mtx");

  sVector sh,sl,s;
  iVectorInt outofcontrol;

  // estimate k=0.32, h = 4.7
  double k = 0.32;
  double h = 4.7;
  // estimate process mean and sigma
  double m = 230.3;
  double sig = 5.2;
  QCCumSumChart(data,s,k,h,m,sig,sh,sl,0.997);
  // find point indexes which exceed h (out-of-control points)
  outofcontrol.FindIndexes(sh,">",h);
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.