| Line 10... |
Line 10... |
| 10 |
low = FALSE, high = FALSE)
|
10 |
low = FALSE, high = FALSE)
|
| 11 |
}
|
11 |
}
|
| 12 |
\alias{mad}
|
12 |
\alias{mad}
|
| 13 |
\arguments{
|
13 |
\arguments{
|
| 14 |
\item{x}{a numeric vector.}
|
14 |
\item{x}{a numeric vector.}
|
| 15 |
\item{center}{Optionally, the centre: defaults to the median.}
|
15 |
\item{center}{optionally, a number, the centre: defaults to the median.}
|
| 16 |
\item{constant}{scale factor.}
|
16 |
\item{constant}{scale factor.}
|
| 17 |
\item{na.rm}{if \code{TRUE} then \code{NA} values are stripped
|
17 |
\item{na.rm}{if \code{TRUE} then \code{NA} values are stripped
|
| 18 |
from \code{x} before computation takes place.}
|
18 |
from \code{x} before computation takes place.}
|
| 19 |
\item{low}{if \code{TRUE}, compute the \sQuote{lo-median}, i.e., for even
|
19 |
\item{low}{if \code{TRUE}, compute the \sQuote{lo-median} of the absolute
|
| 20 |
sample size, do not average the two middle values, but take the
|
20 |
deviations, i.e., for even sample size, do not average the two middle
|
| 21 |
smaller one.}
|
21 |
values, but take the smaller one.}
|
| - |
|
22 |
|
| 22 |
\item{high}{if \code{TRUE}, compute the \sQuote{hi-median}, i.e., take the
|
23 |
\item{high}{if \code{TRUE}, compute the \sQuote{hi-median} of \eqn{|x - <center>|}, i.e., take the
|
| 23 |
larger of the two middle values for even sample size.}
|
24 |
larger of the two middle values for even sample size.}
|
| 24 |
}
|
25 |
}
|
| 25 |
\description{
|
26 |
\description{
|
| 26 |
Compute the median absolute deviation, i.e., the (lo-/hi-) median of
|
27 |
Compute the median absolute deviation, i.e., the (lo-/hi-) median of
|
| 27 |
the absolute deviations from the median, and (by default) adjust by a
|
28 |
the absolute deviations from the median (or another \code{center}), and (by default) adjust by a
|
| 28 |
factor for asymptotically normal consistency.
|
29 |
factor for asymptotically normal consistency.
|
| 29 |
}
|
30 |
}
|
| 30 |
\details{
|
31 |
\details{
|
| 31 |
The actual value calculated is \code{constant * cMedian(abs(x - center))}
|
32 |
The actual value calculated is \code{constant * cMedian(abs(x - center))}
|
| 32 |
with the default value of \code{center} being \code{median(x)}, and
|
33 |
with the default value of \code{center} being \code{median(x)}, and
|