The non-decreasing sequence closest (least squares) to y –
TDA's mmp, and with tie groups its mmp1/mmp2.
Without groups this is plain pool-adjacent-violators and
agrees with stats::isoreg exactly.
Arguments
- y
a numeric vector, in the order to be respected.
- groups
optional vector of the same length marking tie groups by consecutive runs of equal values.
- ties
how tie groups are treated:
"primary"or"secondary"; ignored withoutgroups.- dir
working directory.
- ...
passed to
tda_run.
Details
groups marks observations whose order among themselves is not
meaningful (ties in the ordering variable). Consecutive equal values
form one group – the grouping follows runs, exactly as TDA reads its
tie matrix, so c(1, 1, 2) is two groups but c(1, 2, 1)
is three. How a group is treated is ties:
"primary" (Kruskal's primary approach, mmp1) lets the
fitted values untie freely – the group's values are sorted, fitted,
and each observation receives its rank slot's value, so the result is
monotone only up to reordering within groups; "secondary"
(mmp2) forces one common value per group – the group mean is
fitted and broadcast back.
See also
Other smoothing:
tda_integrate(),
tda_interp(),
tda_mat(),
tda_sma(),
tda_smd(),
tda_spl()