Learn R Programming

metRology (version 0.9-28-1)

MSD-class : Methods for the object returned by msd.

Description

Print and plotting methods for the MSD object class returned by msd.

Usage

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

# S3 method for MSD plot(x, type="h", ylab="MSD", ...)

# S3 method for MSD barplot(height, ylab="MSD", 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), ... )

Arguments

x, height

Object of class "MSD".

type

The plot type. See plot.default.

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, horizontal lines at critical values are added to the plot. These are calculated by link{qmsd} based on supplied values of probs, n and multiple.

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 bootMSD object.

probs

vector of probabilities at which critical values are drawn.

n

integer number of observations for critical value calculation; passed to qmsd.

Parameters passed to other methods.

Value

The print method returns the object, invisibly.

The plot method returns NULL, invisibly.

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

Details

See msd for the object description.

For the barplot method, critical values are ‘single-observation’ quantiles. For use as an outlier test, use probabilities adjusted for multiple comparison; for example, for the barplot method, consider raising the default probs to the power \(1/n\).

See Also

msd, qmsd.

Examples

Run this code
# NOT RUN {
  data(Pb)
  msd.Pb<-msd(Pb$value, Pb$u)  # Uses individual standard uncertainties
  names(msd.Pb) <- as.character(Pb$lab)
  
  plot(msd.Pb)

  barplot(msd.Pb)

# }

Run the code above in your browser using DataLab