monpol.fit: Monotone Polynomials

Description Usage Arguments Value Author(s) References See Also

View source: R/00MonPol.R

Description

This is the basic computing engine called by monpol used to fit monotonic polynomials. These should usually not be used directly unless by experienced users.

Usage

1
2
3
4
5
6
7
8
9
monpol.fit(x, y, w, K=1, start, trace = FALSE, plot.it = FALSE,
           control = monpol.control(),
           algorithm = c("Full", "Hawkins", "BCD", "CD1", "CD2"),
           ptype = c("Elphinstone", "EHH", "Penttila"),
           ctype = c("cge0", "c2"))
SOSpol.fit(x, y, w = NULL, deg.is.odd, K, start, a, b,
           monotone = c("increasing", "decreasing"),
           trace = FALSE, plot.it = FALSE, type,
           control = monpol.control())

Arguments

x

vector containing the observed values for the regressor variable.

y

vector containing the observed values for the response variable; should be of same length as x.

w

optional vector of weights; should be of the same length as x if specified.

deg.is.odd, K

“deg.is.odd” is a logical, “K” is a non negative integer. If “deg.is.odd” is TRUE then a polynomial with highest power 2K+1 will be fitted to the data, otherwise the highest order will be 2K.

start

optional starting value for the iterative fitting.

a,b, type

polynomial should be monotone on the interval from a to b; “type” should be 0 if neither of the boundaries is finite, 1 if a if finite but not b and 2 if both boundaries are finite.

monotone

force the desired monotonicity in case the default choice is wrong.

trace

print out information about the progress of the interative fitting at the start and then every trace iterations.

plot.it

plot the data and initial fit, then plot current fit every plot.it iterations.

control

settings that control the iterative fit; see monpol.control for details.

algorithm

algorithm to be used; see monpol for details.

ptype

parameterisation to be used; see monpol for details.

ctype

parameterisation to be used; see monpol for details.

Value

a list with components

par

the fitted parameters.

grad

the gradient of the objective function at the fitted parameters.

beta

the coefficients of the fitted polynomial in the ‘beta’ parameterisation; on the fitted scale.

RSS

the value of the objective function; on the fitted scale.

niter

number of iterations.

converged

indicates whether algorithm has converged.

ptype

input parameter ptype.

ctype

input parameter cptype.

beta.raw

the coefficients of the fitted polynomial in the ‘beta’ parameterisation; on the original scale.

fitted.values

the fitted values; on the fitted scale.

residuals

the residuals; on the fitted scale.

K

input parameter K.

minx

the minimum value in the vector x.

sclx

the difference between the maximum and minimum values in the vector x.

miny

the minimum value in the vector y.

scly

the difference between the maximum and minimum values in the vector y.

algorithm

input paramater algorithm.

Author(s)

Berwin A Turlach <Berwin.Turlach@gmail.com>

References

Murray, K., M<c3><bc>ller, S. and Turlach, B.A. (2016). Fast and flexible methods for monotone polynomial fitting, Journal of Statistical Computation and Simulation 86(15): 2946–2966, doi: 10.1080/00949655.2016.1139582.

Murray, K., M<c3><bc>ller, S. and Turlach, B.A. (2013). Revisiting fitting monotone polynomials to data, Computational Statistics 28(5): 1989–2005, doi: 10.1007/s00180-012-0390-5.

See Also

monpol which you should use for fitting monotonic polynomials unless you know better.


MonoPoly documentation built on May 2, 2019, 7:59 a.m.