This function builds a u-chart for the Poisson-based count data statistic.
cchart.u(
x1 = NULL,
n1 = NULL,
type = "norm",
u1 = NULL,
x2 = NULL,
n2 = NULL,
lambda = NULL,
u2 = NULL
)The phase I data that will be plotted (if it is a phase I chart).
A value or a vector of values specifying the sample sizes associated with each group for the phase I data.
The type of u-chart to be plotted. The options are "norm" (traditional Shewhart u-chart), "CF" (improved u-chart) and "std" (standardized u-chart). If not specified, a Shewhart u-chart will be plotted.
The sample ratios used to estimate the Poisson parameter (lambda). (x1 / n1).
The phase II data that will be plotted in a phase II chart.
A value or a vector of values specifying the sample sizes associated with each group for the phase II data.
The estimate of lambda.
The sample ratios of the phase II data (x2 / n2).
Returns a u-chart.
For a phase I u-chart, n1 must be specified and either x1 or u1. For a phase II u-chart, n2 must be specified, plus x2 or u2 and either phat, x1 and n1, or u1 and n1. It is important to note that the normal approximation used in the Shewhart u-chart is valid only for n*u large. For small n*p , it should be used an "improved u chart" (with non-normal correction) given by using the argument "CF".
data(moonroof)
attach(moonroof)
#> The following objects are masked from binomdata:
#>
#> i, ni
cchart.u(x1 = yi[1:17], n1 = ni[1:17])
cchart.u(x1 = yi[1:17], n1 = ni[1:17], type = "CF", x2 = yi[18:34], n2 = ni[18:34])
cchart.u(type = "std", u2 = ui[18:34], n2 = ni[18:34], lambda = 1.4)
#> Warning: NaNs produced
#> List of 11
#> $ call : language qcc(data = l, type = "u", sizes = n2, center = 0, limits = c(-SIGMA_MULT, SIGMA_MULT), title = "Standardized| __truncated__
#> $ type : chr "u"
#> $ data.name : chr "l"
#> $ data : num [1:17, 1] -1.229 0.538 -1.149 0.396 -0.304 ...
#> ..- attr(*, "dimnames")=List of 2
#> $ statistics: Named num [1:17] -0.0559 0.0384 -0.0718 0.018 -0.019 ...
#> ..- attr(*, "names")= chr [1:17] "1" "2" "3" "4" ...
#> $ sizes : int [1:17] 22 14 16 22 16 14 5 13 19 10 ...
#> $ center : num 0
#> $ std.dev : num NaN
#> $ nsigmas : num 3
#> $ limits : num [1, 1:2] -3 3
#> ..- attr(*, "dimnames")=List of 2
#> $ violations:List of 2
#> - attr(*, "class")= chr "qcc"