fmmr6 | R Documentation |
An abstract R6Class for the Finite Mixture Models.
No return
fmmr6
PackageThe fmmr6
package adopts an Object-Oriented (OO) design with the help of R6.
It contains three main blocks of constructing and fitting a finite mixture model (FMM):
Finite Mixture Modelling:
Finite Mixture Modelling can the way we construct our finite mixture models.
These modelling techniques are organized under fmmr6
class.
In the current version, we have only developed the mixture of generalized linear models,
which is the fmglm
class.
We are going to add more modelling techniques such as the mixture of
generalized linear models using a panel data structure xtfmglm
.
Methods to fit a FMM models:
The fitting methods such as EM-algorithm (em
) and Maximum Likelihood Estimation (mle
)
are organized under the AbstractMethod
class. In this way, it is convenient to pickup
a different method to fit the FMM models.
Families of distributions:
Different families of distributions are organized under the Family
class.
Currently, the package only supports Gaussian distributions (FamilyNormal
),
Poisson distributions (FamilyPoisson
),
Logit Models with Gaussian distributions (FamilyLogit
),
and Multinomial Logit Models with Gaussian distributions (FamilyMultiNomial
).
These distributions will be sent to a Mixer
class to generate a mixture of
distributions based on the setting of the finite mixture model.
new()
Create a new instance of this R6 R6::R6Class class.
fmmr6$new()
fit()
Fit the fmmr6 model
fmmr6$fit()
summarize()
Generate a summary for the result.
fmmr6$summarize()
predict()
Predict the outcome given the fitted model.
fmmr6$predict()
clone()
The objects of this class are cloneable with this method.
fmmr6$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.