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.
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())vector containing the observed values for the regressor variable.
vector containing the observed values for the response
variable; should be of same length as x.
optional vector of weights; should be of the same length as
x if specified.
“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\).
optional starting value for the iterative fitting.
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.
force the desired monotonicity in case the default choice is wrong.
print out information about the progress of the
interative fitting at the start and then every trace
iterations.
plot the data and initial fit, then plot current fit
every plot.it iterations.
settings that control the iterative fit; see
monpol.control for details.
algorithm to be used; see monpol for
details.
parameterisation to be used; see monpol for
details.
parameterisation to be used; see monpol for
details.
a list with components
the fitted parameters.
the gradient of the objective function at the fitted parameters.
the coefficients of the fitted polynomial in the ‘beta’ parameterisation; on the fitted scale.
the value of the objective function; on the fitted scale.
number of iterations.
indicates whether algorithm has converged.
input parameter ptype.
input parameter cptype.
the coefficients of the fitted polynomial in the ‘beta’ parameterisation; on the original scale.
the fitted values; on the fitted scale.
the residuals; on the fitted scale.
input parameter K.
the minimum value in the vector x.
the difference between the maximum and minimum values in
the vector x.
the minimum value in the vector y.
the difference between the maximum and minimum values in
the vector y.
input paramater algorithm.
Murray, K., M<U+00FC>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, 10.1080/00949655.2016.1139582.
Murray, K., M<U+00FC>ller, S. and Turlach, B.A. (2013). Revisiting fitting monotone polynomials to data, Computational Statistics 28(5): 1989--2005, 10.1007/s00180-012-0390-5.
monpol which you should use for fitting monotonic
polynomials unless you know better.