EstimMethod | R Documentation |
An abstract class for estimation methods which cannot be initialized.
No return.
fmmr6::AbstractMethod
-> EstimMethod
data_model
(DataModel()
)
The DataModel Object that stores the data using in the fmmr6.
constraint
(matrix()
)
The constraint matrix.
latent
(integer(1)
)
The number of latent classes
optim_method
(character(1)
)
The optimization method to use to fit the model.
new()
Create a new instance of this R6 R6::R6Class class.
EstimMethod$new( latent, data_model, start = NULL, optim_method = "base", use_llc = T, constraint = matrix(1), concomitant = NULL )
latent
(numeric(1)
)
The number of latent classes.
data_model
(DataModel()
)
The DataModel object contains data used in the fmmr6.
start
(matrix()
)
The matrix of start values for the EM algorithm.
optim_method
(character(1)
)
The optimization method to use to fit the model.
The default is base
.
use_llc
(boolean(1)
)
Whether to use the complete log-likelihood or the normal log-likelihood.
The default is TRUE
.
constraint
(matrix()
)
The matrix of constraint values for the EM algorithm
concomitant
(formula(1)
)
The formula for the concomitant model. E.g. ~ z1 + z2 + z3
.
Return a R6 object of class em.
partial()
Generate the partial function by filling in some parameters.
EstimMethod$partial(f, ...)
f
(function()
)
The function to be filled in.
...
(list()
)
The list of the parameters to filled in to the functions.
gen_start()
Generate the start values of parameters.
EstimMethod$gen_start()
gen_constraint()
Generate the constraint of parameters.
EstimMethod$gen_constraint()
clone()
The objects of this class are cloneable with this method.
EstimMethod$clone(deep = FALSE)
deep
Whether to make a deep clone.
Dongjie Wu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.