Description Usage Arguments Details Value See Also Examples
This function is called internally by fit_all_models
.
It is the actual function performing the fitting procedure.
To fit all the models, use fit_all_models
instead.
1 2 |
data |
The dataset to be used |
param_matrix_ini |
The matrix storing initial values for the parameters |
xtol_rel |
Tolerance parameter for nloptr |
maxtime |
Maximum time (in seconds) allowed for nloptr to fit; use Inf for best fit! |
lb |
Lower boundary for parameter values during the optimisation (default = 0) |
ub |
Upper boundary for parameter values during the optimisation (default = 3) |
print_level |
Printing setting for nloptr |
The function uses the computation of the likelihood from logLik_from_vector_param
and
optimise the parameter values using the optimisation routine nloptr
from the package of the
same name. Specifically, we are using the method called "NLOPT_LN_BOBYQA".
A list containing the outcome of the fitting procedure
1 2 3 4 | pmat_ini <- build_param_matrix(param_values = c(0.1, 0.2), param_str = c("w1" = "s"))
pmat_ini
## Warning: increase maxtime for real fit!
fit(data = SurvEles_small, param_matrix_ini = pmat_ini, maxtime = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.