FitLRMoE | R Documentation |
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 )
Y |
A N by d ( |
X |
A N*P matrix of numerics, where P is the number of covariates.
The first column of |
alpha_init |
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. |
comp_dist |
A d*g matrix of strings, which specify the component distributions to fit.
The rows represent the dimensions of |
params_list |
A d * g matrix of list with paramster names and values,
which is the initial parameter guess for the corresponding |
experts_init |
An initialization of expert functions returned by |
exposure |
A vector of length N, representing the exposure of the observations (how long it has been observed). |
exact_Y |
TRUE/FALSE: whether |
penalty |
TRUE/FALSE: whether the parameters are penalized for their magnitude. Default (and recommended) is TRUE. |
pen_alpha |
A numeric, which contains penalties for |
pen_params |
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 |
eps |
Stopping criteria for loglikelihood convergence. Default is |
alpha_iter_max |
Maximum number of iterations for updating alpha. Defauls is 5. |
ecm_iter_max |
Maximum number of iterations for ECM. Default is 200. |
grad_jump |
TRUE/FALSE: whether to use an approximated gradient jump to speed up convergence. |
grad_seq |
How are the gradient sequence selected. Default is |
print_steps |
TRUE/FALSE: whether paramater updates are printed on screen. Default is TRUE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.