mandel.k
is a convenience wrapper for mandel.kh(..., type="k"). It is generic,
with methods for numeric vectors, arrays, data frames, matrices and objects of
class 'ilab'
. All parameters are passed to mandel.kh
.
Mandel's \(k\) is an indicator of relative dispersion for grouped
sets of observations. Given a set of observations \(x_{ijl}\) where \(i, j, l\)
denotes observation \(l\), \(l=1, 2, ... n\) for measurand or test item \(j\) and group
(usually laboratory) \(i\), \(i=1, 2, ... p\), Mandel's \(k\) is given by:
$$k=\sqrt{\frac{s_{ij}^2}{\sum_{i=1}^p{s_{ij}^2/p}}}$$
where \(s_{ij}\) is the standard deviation of values \(x_{ijk}\) over \(k=1, 2, ..., n\).
If x
is a vector, one-dimensional array or single-column matrix, values are aggregated
by g
and, if present, by m
. If x
is a data frame or matrix, each column
is aggregated by g
and m
silently ignored if present. In all cases, if g
is NULL
or missing, each row (or value, if a vector) in x
is taken as a pre-calculated mean (for Mandel's h) or standard deviation (for Mandel's k).
If x
is an object of class 'ilab'
, g
defaults to '$org'
and
m
to $measurand
.
The returned object includes a label ('grouped.by'
) for the primary grouping factor.
For the 'ilab'
method, this is "Organisation". For other methods, If rowname
is
non-null, rowname
is used. If rowname
is NULL, the default is deparse(substitute(g))
;
if g
is also NULL or missing, "Row" is used.
If method="robust"
, Mandel's \(k\) is calculated by replacing the classical pooled standard
deviation with the robust pooled standard deviation calculated by algorithm S (see algS
).