View source: R/delay_estimation.R
delay_model | R Documentation |
Maximum product of spacings estimation is used by default to fit the parameters. Estimation via naive maximum likelihood (method = 'MLEn
) is available, too,
but MLEn yields biased estimates. MLEc is a corrected version of MLE due to Cheng.
delay_model(
x = stop("Specify observations for at least one group x=!", call. = FALSE),
y = NULL,
distribution = c("exponential", "weibull"),
twoPhase = FALSE,
bind = NULL,
ties = c("density", "equidist", "random", "error"),
method = c("MPSE", "MLEn", "MLEw", "MLEc"),
profiled = method == "MLEw",
optim_args = NULL,
verbose = 0
)
x |
numeric. observations of 1st group. Can also be a list of data from two groups. |
y |
numeric. observations from 2nd group |
distribution |
character. Which delayed distribution is assumed? Exponential or Weibull. |
twoPhase |
logical. Allow for two phases? |
bind |
character. parameter names that are bind together in 2-group situation. |
ties |
character. How to handle ties. |
method |
character. Which method to fit the model? 'MPSE' = maximum product of spacings estimation or 'MLEn' = naive maximum likelihood estimation or 'MLEw' = weighted MLE' or MLEc' = corrected MLE |
profiled |
logical. Profile out scale from log-likelihood if possible. |
optim_args |
list. optimization arguments to use. Use |
verbose |
integer. level of verboseness. Default 0 is quiet. |
Numerical optimization is done by stats::optim
.
incubate_fit
the delay-model fit object. Or NULL
if optimization failed (e.g. too few observations).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.