Learn R Programming

FlexDir (version 1.0)

FD.estimation: Flexible Dirichlet Estimation

Description

Estimates the vector of parameters of a Flexible Dirichlet distribution through an EM-based maximum likelihood approach.

Usage

FD.estimation(data, normalize = F, iter.initial.SEM = 50,
  iter.final.EM = 100, verbose = T)

Arguments

data
a matrix or a dataframe containing only the variables in the model. Rows must sum to one, or normalize must be set TRUE.
normalize
if TRUE, each row of data will be divided by its own total to become a point of the simplex. Values in data must be positive.
iter.initial.SEM
number of iterations for the initial SEM step. Default to 50.
iter.final.EM
number of iterations for the final EM step. Default to 100.
verbose
if TRUE, the progression of the elaboration and the results will be printed on screen.

Value

an object of class FDfitted. It's a list composed by:
alpha
Estimated values of the parameter vector Alpha
p
Estimated values of the parameter vector P
tau
Estimated value of the parameter Tau
logL
LogLikelihood
data
Normalized dataset

Details

The procedure is made up of four stages:
  1. Clustering: The algorithm applies many different clustering rules to the dataset, in order to exploit the specific cluster patterns that the parameter structure of the model involves.
  2. Labelling: Once the initial partitions are obtained, group labeling needs to be established because any clustering algorithm assigns the group labels randomly, but the FD cluster structure entails a precise labelling scheme.
  3. Initial SEM: A Stochastic E-M algorithm is applied at every initial partition and every possible label permutation identified.
  4. Final E-M: The previous step must be seen as a multiple initialization strategy. At this point only the best one is selected and a final E-M algorithm is used to find the point that maximizes the likelihood of the parameter vector.

References

Ongaro, A. and Migliorati, S. (2013) A generalization of the Dirichlet distribution. Journal of Multivariate Analysis, 114, 412--426. Migliorati, S., Ongaro, A. and Monti, G. S. (2016) A structured Dirichlet mixture model for compositional data: inferential and applicative issues. Statistics and Computing, doi:10.1007/s11222-016-9665-y.

See Also

FD.generate, FD.stddev, FD.aicbic, FD.barycenters, FD.ternaryplot, FD.rightplot, FD.marginalplot

Examples

Run this code
data <- FD.generate(n=20,a=c(12,7,15),p=c(0.3,0.4,0.3),t=8)
data
results <- FD.estimation(data, normalize=TRUE,iter.initial.SEM = 5,iter.final.EM = 10)
results
summary(results)

Run the code above in your browser using DataLab