LCS(x, u, p = 0.05, method = "enum", simplify = FALSE,
verbose = FALSE)
x
.simplify
is TRUE
, only the lowest-uncertainty
subset is returned even if several are of the same size.simplify=TRUE
, a vector of indices
for x
representing the largest consistent subset.
If there is more than one subset of maximum size and simplify=FALSE
, a matrix of indices
in which the rows contain the indices of each subset.LCS
obtains the largest subset(s) of x
which pass a chi-squared
test for consistency, taking the uncertainties u
into account.
method
controls the search method used. Method "enum" uses complete enumeration
of all subsets of size n
, starting at n==length(x)
and decreasing n
until at least one consistent subset is found. No other method is currently supported; if
a different method is specified, LCS provides a warning and continues with "enum".
There may be more than on consistent subset of size n. If so, LCS returns all such
subsets unless simplify
is TRUE
, in which case LCS prints a short warning
and returns the subset with smallest estimated uncertainty as estimated for the Graybill-Deal
weighted mean assuming large degrees of freedom in u
.
verbose
controls the level of reporting. If TRUE
, LCS prints the progress of
the search.
The general idea of a Largest Consistent Subset as implemented here was suggested by Cox (2006),
though at least one other related method has been suggested by Heydorn (2006). It has,
however, been criticised as an estimator (Toman and Possolo (2009)) ; see Warning below.data(Pb)
with(Pb, LCS(value, U/k))
Run the code above in your browser using DataLab