Control parameters for emfrail
emfrail_control(opt_fit = TRUE, se = TRUE, se_adj = TRUE,
ca_test = TRUE, only_ca_test = FALSE, lik_ci = TRUE,
lik_ci_intervals = list(interval = c(-3, 20), interval_stable = c(0, 20)),
nlm_control = list(stepmax = 1), inner_control = list(eps = 1e-04, maxit =
Inf, fast_fit = TRUE, verbose = FALSE, lower_tol = 20, lik_tol = 1))
Logical. Whether the outer optimization should be carried out.
If FALSE
, then the frailty parameter is treated as fixed and the emfrail
function returns only log-likelihood. See details.
Logical. Whether to calculate the variance / covariance matrix.
Logical. Whether to calculate the adjusted variance / covariance matrix (needs se == TRUE
)
Logical. Should the Commenges-Andersen test be calculated?
Logical. Should ONLY the Commenges-Andersen test be calculated?
Logical. Should likelihood-based confidence interval be calculated for the frailty parameter?
This list should contain two length 2 vectors interval
and interval_stable
that are used in calculating likelihood-based
confidence intervals. These are the edges, on the scale of \(\theta\), of the parameter space where to look for the
ends of these confidence intervals.
A list of named arguments to be sent to nlm
for the outer optimization.
A list of parameters for the inner optimization. See details.
An object of the type emfrail_control
.
The nlm_control
argument should not overalp with hessian
, f
or p
.
The inner_control
argument should be a list with the following items:
eps
A criterion for convergence of the EM algorithm (difference between two consecutive values of the log-likelihood)
maxit
The maximum number of iterations between the E step and the M step
fast_fit
Logical, whether the closed form formulas should be used for the E step when available
verbose
Logical, whether details of the optimization should be printed
lower_tol
A "lower" bound for \(\theta\); after this treshold, the algorithm returns the limiting log-likelihood of the no-frailty model. For example,
a value of 20 means that the maximum likelihood for \(\theta\) will be \(\exp(20)\). For a frailty variance, this is approx \(2 \times 10^{-9}\)
lik_tol
For values higher than this, the algorithm returns a warning when the log-likelihood decreases between EM steps. Technically, this should not happen, but
if the parameter \(\theta\) is somewhere really far from the maximum, numerical problems might lead in very small likelihood decreases.
The fast_fit
option make a difference when the distribution is gamma (with or without left truncation) or
inverse Gaussian, i.e. pvf with m = -1/2 (without left truncation). For all the other scenarios, the fast_fit option will
automatically be changed to FALSE. When the number of events in a cluster / individual is not very small, the cases for which
fast fitting is available will show an improvement in performance.
The starting value of the outer optimization may be set in the .distribution
argument.
# NOT RUN {
emfrail_control()
emfrail_control(inner_control = list(eps = 1e-7))
# }
Run the code above in your browser using DataLab