PDchisq-class {metRology} | R Documentation |
Methods for the object returned by pdchisq
.
Description
Print and plotting methods for the PDchisq
object class returned by pdchisq
.
Usage
## S3 method for class 'PDchisq'
print(x, ...)
## S3 method for class 'PDchisq'
plot(x, type="h", ylab="Pair-difference chi-squared", ylim=NULL, ...)
## S3 method for class 'PDchisq'
barplot(height, ylab="Pair-difference chi-squared", names.arg=names(height),
crit.vals=TRUE, lty.crit=c(2,1), col.crit=2, lwd.crit=c(1,2),
probs=c(0.95, 0.99), n=length(height), ylim=NULL, ... )
bootPDchisq(x, B=3000, probs=c(0.95, 0.99),
method=c("rnorm", "lhs"), keep=FALSE, labels=names(x), ...)
Arguments
x , height |
Object of class |
type |
The plot type. See |
ylab |
Label for vertical axis, passed to |
names.arg |
Labels for individual bars in bar plot, passed to |
crit.vals |
If |
lty.crit , col.crit , lwd.crit |
Vectors of line style parameters for plotted critical values, passed to
|
probs |
vector of probabilities at which critical values are drawn (or, for the bootstrap, calculated and retained. |
n |
integer number of observations (NOT degrees of freedom) for critical value
calculation; used (as |
B |
integer number of bootstrap replicates; passed to |
ylim |
Limits for y-axis. the default makes sure the axis begins at zero and includes all values |
method |
simulation method; passed to |
keep |
logical, indicating whether to retain simulated values.
Passed to |
labels |
labels for returned object; passed to |
... |
Parameters passed to other methods. |
Details
See pdchisq
for the “PDchisq” object description.
The quantiles plotted by the barplot method are based on qchisq
,
divided by n-1
.
Note that this assumes independence and is at best a guide; for more accurate
quantiles, see bootPDchisq
For the barplot method, the default critical values are ‘single-observation’
quantiles. For use as an outlier test, use probabilities adjusted for multiple comparison;
for example, consider raising the default probs
to the power 1/n
.
Specifying n
directly is principally intended for when the plotted values are not
the whole set of pair-difference chi-squared values calculated from a given data set.
However, it can also be useful for limiting cases. Where a
single value has very small uncertainty s
, its pair-difference chi-squared
is distributed approximately as \chi^2(n-1)
. At the other
extreme, if a single value has very large uncertainty s
compared to others,
its pair-difference chi-squared is distributed approximately as \chi^2(1)
.
bootPDchisq
generates a parametric bootstrap (Monte carlo simulation)
from an object of class "PDchisq"
. This provides a case-specific test
of the null that all mean values are equal, with the uncertainties and/or
covariances accurate. bootPDchisq
is a wrapper for
boot.mtr.pairwise
, which provides further information.
Value
The print
method returns the object, invisibly.
The plot
method returns NULL, invisibly.
The barplot
method returns the values at the midpoint of each bar.
bootPDchisq
returns an object of class "bootMtrPairs"
; see
bootMtrPairs-class
for details.
Author(s)
S. L. R. Ellison s.ellison@lgcgroup.com
See Also
pdchisq
, qchisq
, bootMtrPairs-class
.
Examples
data(Pb)
pdchisq.Pb<-pdchisq(Pb$value, Pb$u) # Uses individual standard uncertainties
names(pdchisq.Pb) <- as.character(Pb$lab)
plot(pdchisq.Pb)
barplot(pdchisq.Pb)