monpol.fit {MonoPoly} | R Documentation |
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())
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 |
w |
optional vector of weights; should be of the same length as
|
deg.is.odd, K |
“deg.is.odd” is a logical, “K” is a
non negative integer. If “deg.is.odd” is |
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 |
plot.it |
plot the data and initial fit, then plot current fit
every |
control |
settings that control the iterative fit; see
|
algorithm |
algorithm to be used; see |
ptype |
parameterisation to be used; see |
ctype |
parameterisation to be used; see |
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 |
ctype |
input parameter |
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 |
minx |
the minimum value in the vector |
sclx |
the difference between the maximum and minimum values in
the vector |
miny |
the minimum value in the vector |
scly |
the difference between the maximum and minimum values in
the vector |
algorithm |
input paramater |
Berwin A Turlach <Berwin.Turlach@gmail.com>
Murray, K., Mü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ü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.
monpol
which you should use for fitting monotonic
polynomials unless you know better.