ismonotone: Check whether a polynomial is monotone

Description Usage Arguments Value Author(s) Examples

View source: R/ismonotone.R

Description

Function to check whether a polynomial is montone over a given interval.

Usage

1
2
3
4
5
6
7
ismonotone(object, ...)

## S3 method for class 'monpol'
ismonotone(object, a = -Inf, b = Inf, EPS = 1e-06, ...)

## Default S3 method:
ismonotone(object, a = -Inf, b = Inf, EPS = 1e-06, ...)

Arguments

object

Either an object of class ‘

monpol

or a numeric vector containing the coefficient of the polynomial.

a

Lower limit of the interval over which the polynomial should be montone.

b

Upper limit of the interval over which the polynomial should be montone.

EPS

Numerical precision, values with absolute value smaller than EPS are treated as zero.

...

Further arguments passed to or from other methods.

Value

TRUE or FALSE depending on whether the polynomial is montone over (a,b) or not.

Note that due to numerical precision issues it is possible that a polynomial that should be monotone is declared to be not monotone.

Author(s)

Kevin Murray and Berwin A Turlach

Examples

1
2
3
4
5
6
7
  fit <- monpol(y~x, w0)
  ismonotone(fit)

  beta <- c(1,0,2)  ## the polynomial 1 + 2*x^2
  ismonotone(beta)
  ismonotone(beta, a=0)
  ismonotone(beta, b=0)

MonoPoly documentation built on May 19, 2017, 5:06 p.m.

Search within the MonoPoly package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.