Learn R Programming

metRology (version 0.9-29-2)

bootMtrPairs-class : Object returned by bootMtrPairs and associated methods.

Description

The object class returned by boot.mtr.pairwise and associated print, summary, and plotting classes.

Usage

# S3 method for bootMtrPairs
print(x, ...)

# S3 method for bootMtrPairs plot(x, ...)

# S3 method for bootMtrPairs barplot(height, ylab=NULL, names.arg=height$labels, crit.vals=TRUE, lty.crit=c(2,1), col.crit=2, lwd.crit=c(1,2), ylim=NULL, ... )

# S3 method for bootMtrPairs summary(object, p.adjust="none", ...)

# S3 method for summary.bootMtrPairs print(x, digits=3, ..., signif.stars = getOption("show.signif.stars"), signif.legend=signif.stars)

Value

The print method returns the object, invisibly.

The plot and barplot methods return the values at the midpoint of each bar.

The summary method returns an object of class "summary.bootMtrPairs" which is a list with members:

t0

vector of values calculated by msd or pdchisq

labels

character vector of labels, by default taken from x

probs

vector of probabilities supplied and used for quantiles

critical.values

matrix of quantiles. Each row corresponds to a probability in probs and each column to an individual data point.

pvals

p-values estimated as the observed proportion of simulated values exceeding the calculated values t0.

p.adjust

Character value containing the name of the p-value adjustment method used.

p.adj

p-values adjusted using the given p-value adjustment method specified by p.adjust.

B

Number of bootstrap replicates used.

method

The sampling method used by the parametric bootstrap.

stat

The statistic subjected to bootstrapping. Either "MSD" or "PWchi2" for msd or pdchisq, respectively.

t

If keep == TRUE, the individual bootstrap replicates generated by msd or pdchisq. t is set to NA if keep == FALSE

.

Arguments

x

An R object. For print.bootMtrPairs and plot.bootMtrPairs, an object of class "bootMtrPairs". For print.summary.bootMtrPairs, an object of class "summary.bootMtrPairs".

height

An object of class "bootMtrPairs".

object

An object of class "bootMtrPairs".

p.adjust

Multiple correction method for calculated p-values, passed to p.adjust.

ylab

Label for vertical axis, passed to barplot

names.arg

Labels for individual bars in bar plot, passed to barplot. If names(height) is NULL, bars are numbered.

crit.vals

If TRUE, individual critical values based on observation-specific bootstrap quantiles are added to the plot. These are taken from critical.values in the supplied bootMtrPairs object.

lty.crit, col.crit, lwd.crit

Vectors of line style parameters for plotted critical values, passed to segments. Recycled to the length of critical.values in the supplied bootMtrPairs object.

ylim

Limits for plot y range, passed to barplot. The default ensures that the plotted bars and (if crit.vals=TRUE) the critical values are included in the figure region.

digits

integer; passed to print. The minimum number of significant digits to be printed in values. Change to NULL for default.

signif.stars

logical; if TRUE, P-values are additionally encoded visually as ‘significance stars’ in order to help scanning of long coefficient tables. Defaults to the show.signif.stars slot of options.

signif.legend

logical; if TRUE, a legend for the ‘significance stars’ is printed provided signif.stars == TRUE.

...

Parameters passed to other methods.

Author

S. L. R. Ellison s.ellison@lgcgroup.com

Details

The default plot method is an alias for the barplot method. For the plot methods, quantiles for each point are taken directly from the quantiles calulated by boot.mtr.pairwise and retained in the returned object.

For the summary method, p-values are initially calculated as the observed proportion of simulated values exceeding the MSD value calculated by msd. The summary method additionally returns p-values after adjustment for multiple comparisons using the adjustment method specified.

The print method for the summary.bootMtrPairs object prints the summary as a data frame with columns for the calculated values (re-titled for the particular statstic), data-specific upper quantiles (one column for each probability supplied to bootMtrPairs and the p-values after adjustment for multiple comparisons based on the proportion of simulated values exceeding the observed MSD. Where that proportion is zero, the summary replaces the raw zero proportion with 1/B, corrects that proportion using the requested adjustment method, and reports the p-value as less than ("<") the resulting adjusted value.

See Also

msd, qmsd, pdchisq

Examples

Run this code

  if (FALSE) {
  data(Pb)
  pwch.Pb<-pdchisq(Pb$value, Pb$u)  # Uses individual standard uncertainties

  set.seed(1023)
  boot.Pb <- boot.mtr.pairwise(pwch.Pb)
  summary(boot.Pb)

  # The default summary gives individual observation p-values. To 
  # avoid over-interpretation for the study as a whole, 
  # apply a sensible p-value adjustment:
  summary(boot.Pb, p.adjust="holm")

  plot(boot.Pb, crit=TRUE)

  }

Run the code above in your browser using DataLab