diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-10-21 12:11:34 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-10-21 12:11:34 +0200 |
commit | 7624a2b8398b4ad665a3b0b622488e1893a5ee7c (patch) | |
tree | 30e5bc32adc77de6540e68fa80a157f893c7770d /man | |
parent | 8ce251e5ee619a240da2381eda58bc94a554ca37 (diff) |
Refactor mkinfit, infrastructure work
mkinfit objects now include an ll() function to calculate the
log-likelihood. Part of the code was refactored, hopefully making it
easier to read and maintain. IRLS is currently the default algorithm for
the error model "obs", for no particular reason. This may be subject
to change when I get around to investigate.
Slow tests are now in a separate subdirectory and will probably
only be run by my own Makefile target.
Formatting of test logs is improved.
Roundtripping error model parameters works with a precision of 10% when
we use lots of replicates in the synthetic data (see slow tests). This
is not new in this commit, but as I think it is reasonable this
closes #7.
Diffstat (limited to 'man')
-rw-r--r-- | man/mkinfit.Rd | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/man/mkinfit.Rd b/man/mkinfit.Rd index f7dd7009..85b742e8 100644 --- a/man/mkinfit.Rd +++ b/man/mkinfit.Rd @@ -31,8 +31,8 @@ mkinfit(mkinmod, observed, quiet = FALSE, atol = 1e-8, rtol = 1e-10, n.outtimes = 100, error_model = c("const", "obs", "tc"), - error_model_algorithm = c("d_3", "direct", "twostep", "threestep", "fourstep", "IRLS", - "OLS"), + error_model_algorithm = c("auto", "d_3", "direct", "twostep", "threestep", + "fourstep", "IRLS", "OLS"), reweight.tol = 1e-8, reweight.max.iter = 10, trace_parms = FALSE, ...) } @@ -175,12 +175,13 @@ mkinfit(mkinmod, observed, distribution as assumed by this method. } \item{error_model_algorithm}{ - If the error model is "const", the error model algorithm is ignored, - because no special algorithm is needed and unweighted (also known as - ordinary) least squares fitting (listed as "OLS" in the summary) can be - applied. + If "auto", the selected algorithm depends on the error model. + If the error model is "const", nonlinear least squares fitting ("OLS") is + selected. If the error model is "obs", iteratively reweighted least squares + fitting ("IRLS") is selected. If the error model is "tc", the "d_3" + algorithm is selected. - The default algorithm "d_3" will directly minimize the negative + The algorithm "d_3" will directly minimize the negative log-likelihood and - independently - also use the three step algorithm described below. The fit with the higher likelihood is returned. @@ -206,9 +207,6 @@ mkinfit(mkinmod, observed, parameters and subsequent optimization of the degradation model using those error model parameters, until the error model parameters converge. - - The algorithm "OLS" (Ordinary Least Squares) is automatically selected when - the error model is "const" and results in an unweighted least squares fit. } \item{reweight.tol}{ Tolerance for the convergence criterion calculated from the error model |