FoM.FitBinnedSampleRepeatErrors: Fitting step in Figure of Merit calculation.

Description Usage Arguments Value Author(s)

Description

This is the last step in obtaining a figure of merit. The binned data is fitted by iterating over all alpha values. For each alpha value the best additive fit left of the alpha value and the best multiplicative fit right of the alpha value is determined. The alpha value which then produces the best overall fit (smallest residual) is chosen for the overall fit.

Usage

1
FoM.FitBinnedSampleRepeatErrors(ordered.bins.by.mean, fit.type = 1, alpha.steps = 100)

Arguments

ordered.bins.by.mean

the result of the FoM.OrderAndBinIdByMeans method.

fit.type

which type of fitting approach should be used. This can be either "1" for use of the standard "lm" method in R. Or can be "2" in case the "rlm" method from the MASS package should be used. The latter is a more robust fitting method.

alpha.steps

the number of alpha values to be used (in essence it defines the number of points on the x axis for which different fits need to be tried to find the best fit).

Value

In addition to plotting the bins and showing the best fit, a list is returned containing the following values:

best.fit

A vector containing the three parameters that define the best fit: alpha value, additive coefficient, multiplicative coefficient, and the residual of the fit.

alphas

A vector containing all the alpha values used for fitting.

tot.res.ssq.per.alpha

A vector that gives the alpha values' corresponding residuals per fit.

ad.coeff.per.alpha

A vector that gives the alpha values' corresponding additive coefficient per fit.

mu.coeff.per.alpha

A vector that gives the alpha values' corresponding multiplicative coefficient per fit.

Note: this result is identical to the FoM.Calculate result, since this method is the last step in the overall FoM method.

Author(s)

Tim Dorscheidt


MetStaT documentation built on May 2, 2019, 1:45 p.m.