cochranTest(X,id,fun='sum',alpha=0.05)
data.frame
or matrix
factor
of the replicate identifierslist
with components: X
'matrix
from which outlying observations (rows)
have been removed}outliers
'vector
giving the row indices of the input data that
have been flagged as outliersfun
argument) such as sum
, mean
, or
first principal components ('PC1' and 'PC2').
An observation is considered to have an outlying variance
if the Cochran C statistic is higher than an upper
limit critical value $C_{UL}$ which can be evaluated
with ('t Lam, 2010):
$$C_{UL}(\alpha,n,N) = \left
[1+\frac{N-1}{F_{c}(\alpha/N,(n-1),(N-1)(n-1))} \right
]^{-1}$$
where $\alpha$ is the p-value of the test,
$n$ is the (average) number of replicates and $F_c$
is the critical value of the Fisher's $F$ ratio.
The replicates with outlying variance are removed and the
test can be applied iteratively until no outlying variance
is detected under the given p-value. Such iterative
procedure is implemented in cochranTest
, allowing
the user to specify whether a set of replicates should be
removed or not from the dataset by graphical inspection of
the outlying replicates. The user has then the possibility
to (i) remove all replicates at once, (ii) remove one or
more replicates by giving their indices or (iii) remove
nothing.