Fitting Functions
LRMoE.fit_LRMoE
— Functionfit_LRMoE(Y, X, α_init, model; ...)
Fit an LRMoE model.
Arguments
Y
: A matrix of response.X
: A matrix of covariates.α
: A matrix of logit regression coefficients.model
: A matrix specifying the expert functions.
Optional Arguments
expusure
: an array of numerics, indicating the time invertal over which the count data (if applicable) are collected. Ifnothing
is provided, it is set to 1.0 for all observations. It is assumed that all continuous expert functions are not affected byexposure
.exact_Y
:true
orfalse
(default), indicating ifY
is observed exactly or with censoring and truncation.penalty
:true
(default) orfalse
, indicating whether penalty is imposed on the magnitude of parameters.pen_α
: a numeric penalty on the magnitude of logit regression coefficients. Default is 1.0.pen_params
: an array of penalty term on the magnitude of parameters of component distributions/expert functions.ϵ
: Stopping criterion on loglikelihood (stop when the increment is less thanϵ
). Default is 0.001.α_iter_max
: Maximum number of iterations when updatingα
. Default is 5.ecm_iter_max
: Maximum number of iterations of the ECM algorithm. Default is 200.grad_jump
: IN DEVELOPMENTgrad_seq
: IN DEVELOPMENTprint_steps
:true
(default) orfalse
, indicating whether intermediate updates of parameters should be logged.
Return Values
model_result.α_fit
: Fitted values of logit regression coefficientsα
.model_result.comp_dist
: Fitted parameters of expert functions.converge
:true
orfalse
, indicating whether the fitting procedure has converged.iter
: Number of iterations passed in the fitting function.ll
: Loglikelihood of the fitted model (with penalty on the magnitude of parameters).ll_np
: Loglikelihood of the fitted model (without penalty on the magnitude of parameters).AIC
: Akaike Information Criterion (AIC) of the fitted model.BIC
: Bayesian Information Criterion (BIC) of the fitted model.
Base.summary
— Functionsummary(obj)
Summarizes a fitted LRMoE model.
Arguments
obj
: An object returned byfit_LRMoE
function.
Return Values
Prints out a summary of the fitted LRMoE model on screen.