| msd | R Documentation | 
Generates median of scaled differences from each point in a data set to all other points..
        msd(x, s=mad , ...)
	
| x | Vector of observations | 
| s | Either a function returning an estimate of scale for  | 
| ... | Parameters passed to  | 
For each observation x[i], msd calculates the median of |x[i]-x[j]|/sqrt(s[i]^2+s[j]^2), j!=i,
that is, the median of differences divided by the estimated uncertainties of the distance.
If s is a function, it is applied to x and replicated to length length(x); if 
a scalar, it is replicated to length length(x). 
The median scaled difference is a measure of how ‘far’ an individual observation is from 
the majority of the other values in the data set. As a rule of thumb, values above
2 are indicative of a suspect (x[i], s[i]) data pair; that is, a value x[i] that 
is remote from a large fraction of the remaining data given its associated standard 
error or standard uncertainty s[i].
An object of class "MSD", consisting of a vector of length length(x) of median 
scaled absolute deviations for each observation, with attributes:
| names | character vector of names, taken from  | 
| x | values supplied as  | 
| s | values supplied as  | 
Print and plotting methods are currently provided for the "MSD" class; 
see MSD-class.
S. L. R. Ellison s.ellison@lgcgroup.com
Ellison, S. L. R. (2018) An outlier-resistant indicator of anomalies among inter-laboratory comparison data with associated uncertainty. _Metrologia_ (accepted 4 October 2018)
pmsd, qmsd, MSD-class.
  data(Pb)
  msd(Pb$value)  # Uses mad(Pb$value) as scale estimate
  msd(Pb$value, Pb$u)  # Scales differences using standard uncertainties
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.