isMonotoneR: Check for monotonicity of function values in the right tail.

View source: R/sharpenedKDE.R

isMonotoneRR Documentation

Check for monotonicity of function values in the right tail.

Description

Given a vector of n function values and an index ix, determines whether the function values having indices greater than or equal to ix are non-decreasing or non-increasing. Returns TRUE if they are, FALSE otherwise.

Usage

isMonotoneR(f, ix)

Arguments

f

A vector of function values for increasing abscissa values.

ix

An index giving the cutoff for checking monotonicity.

Details

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.

Value

A logical value indicating if the constraint is satisfied.


scdensity documentation built on Sept. 12, 2024, 7:35 a.m.