Given a vector of n function values and an index ix, determines whether the function values having indices less than or equal to ix are non-decreasing or non-increasing. Returns TRUE if they are, FALSE otherwise.
isMonotoneL(f, ix)
A logical value indicating if the constraint is satisfied.
A vector of function values for increasing abscissa values.
An index giving the cutoff for checking monotonicity.
As in isUnimodal
, the values are first scaled to fill [0, 1] and then rounded to
four decimal places. This eliminates unwanted detection of tiny differences as modes.
This function is intended to be called from other functions in the scdensity package. It does not implement any argument checking.