FitLRMoE.Rd
Main fitting function of LRMoE
FitLRMoE(
Y,
X,
alpha_init,
comp_dist,
params_list,
experts_init = NULL,
exposure = NULL,
exact_Y = FALSE,
penalty = TRUE,
pen_alpha = 5,
pen_params = NULL,
eps = 0.001,
alpha_iter_max = 3,
ecm_iter_max = 200,
grad_jump = TRUE,
grad_seq = NULL,
print_steps = TRUE
)
A N by d (exact_Y=T
) or N by 4d (exact_Y=F
) matrix of numerics,
where N is sample size and d is the dimension of each obsevation.
If the size is N by 4d, Each block of four columns should be organized as (tl, yl, yu, tu)
, representing the
truncation lower bound, censoring lower bound, censoring upper bound and truncation upper bound.
A N*P matrix of numerics, where P is the number of covariates.
The first column of X
should be 1, which is the intercept.
A g*P matrix of numerics, which contains initial guess of the logit regression coefficients. The last row should all be zero, representing the default latent class. If no initialization is provided, all coefficients are set to zero.
A d*g matrix of strings, which specify the component distributions to fit.
The rows represent the dimensions of Y
, while the columns represent the component distributions.
A d * g matrix of list with paramster names and values,
which is the initial parameter guess for the corresponding comp_dist
.
An initialization of expert functions returned by cmm_init
.
Provide either experts_init
or (comp_dist
and params_init
).
A vector of length N, representing the exposure of the observations (how long it has been observed).
TRUE/FALSE: whether Y
is observed exactly, or with censoring and/or truncation.
TRUE/FALSE: whether the parameters are penalized for their magnitude. Default (and recommended) is TRUE.
A numeric, which contains penalties for alpha_init
.
If penalty=T
but no pen_alpha
is provided, a constant is used.
A list of length d, where each element is a sublist of length g.
Each sublist contains one numeric vector, which is the corresponding penalty for params.init
.
Stopping criteria for loglikelihood convergence. Default is 1e-03
.
Maximum number of iterations for updating alpha. Defauls is 5.
Maximum number of iterations for ECM. Default is 200.
TRUE/FALSE: whether to use an approximated gradient jump to speed up convergence.
How are the gradient sequence selected. Default is 2^(seq(8)-1)-1
.
TRUE/FALSE: whether paramater updates are printed on screen. Default is TRUE.