Title: | Tools to Work with the Flexible Dirichlet Distribution |
---|---|
Description: | Provides tools to work with the Flexible Dirichlet distribution. The main features are an E-M algorithm for computing the maximum likelihood estimate of the parameter vector and a function based on conditional bootstrap to estimate its asymptotic variance-covariance matrix. It contains also functions to plot graphs, to generate random observations and to handle compositional data. |
Authors: | Sonia Migliorati [aut], Agnese Maria Di Brisco [aut, cre], Matteo Vestrucci [aut] |
Maintainer: | Agnese Maria Di Brisco <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2024-11-03 05:36:09 UTC |
Source: | https://github.com/cran/FlexDir |
Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC) of a fitted Flexible Dirichlet model.
An Information Criterion for one fitted model object for which a log-likelihood value can be obtained is defined as
, where
represents the number of parameters in the fitted model, and
for AIC, or
for BIC (
being the number of observations).
FD.aicbic(x)
FD.aicbic(x)
x |
an object of class FDfitted, usually the result of |
FD.estimation
, FD.stddev
, FD.barycenters
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 FD.aicbic(results)
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 FD.aicbic(results)
Given a matrix or a numeric dataframe, this function returns a composition where a set of specified columns is amalgamated together. The compositional operation of amalgamation provides sums of composition elements aimed at grouping homogeneous parts of the whole.
FD.amalgamation(data, columns, name = NULL)
FD.amalgamation(data, columns, name = NULL)
data |
a matrix or a dataframe containing only variables to be transformed into compositional variables, after amalgamation. |
columns |
numeric vector containing the position of the columns to be amalgamated together. |
name |
string containing the name of the new column resulted from the amalgamation. |
Values must be positive. In case one row-entry (or more) is NA, the whole row will be returned as NA.
FD.generate
, FD.subcomposition
, FD.normalization
data(oliveoil) dataoil <- oliveoil head(dataoil) data <- FD.normalization(dataoil[,3:10]) head(data) data.sub <- FD.subcomposition(data,c(1,3,4,5)) head(data.sub) data.amalg <- FD.amalgamation(data,c(2,6,7,8),name='others') head(data.amalg)
data(oliveoil) dataoil <- oliveoil head(dataoil) data <- FD.normalization(dataoil[,3:10]) head(data) data.sub <- FD.subcomposition(data,c(1,3,4,5)) head(data.sub) data.amalg <- FD.amalgamation(data,c(2,6,7,8),name='others') head(data.amalg)
Cluster barycenters of a fitted Flexible Dirichlet distribution.
FD.barycenters(x)
FD.barycenters(x)
x |
an object of class FDfitted, usually the result of |
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.
FD.estimation
, FD.clusterdistances
, FD.moments
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 FD.barycenters(results)
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 FD.barycenters(results)
Returns a measure of symmetrized Kullback-Leibler distance between mixture component densities of a fitted Flexible Dirichlet distribution.
FD.clusterdistances(x)
FD.clusterdistances(x)
x |
an object of class FDfitted, usually the result of |
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.
FD.estimation
, FD.barycenters
, FD.moments
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 FD.clusterdistances(results)
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 FD.clusterdistances(results)
Density function on the simplex for the Flexible Dirichlet distribution with parameters a
, p
and t
.
FD.density(x, a, p, t)
FD.density(x, a, p, t)
x |
vector of a point on the simplex. It must sum to one. |
a |
vector of the non-negative alpha parameters. |
p |
vector of the clusters' probabilities. It must sum to one. |
t |
non-negative scalar tau parameter. |
Vectors x
, a
and p
must be of the same length.
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.
x <- c(0.1,0.25,0.65) alpha <- c(12,7,15) prob <- c(0.3,0.4,0.3) tau <- 8 FD.density(x,alpha,prob,tau)
x <- c(0.1,0.25,0.65) alpha <- c(12,7,15) prob <- c(0.3,0.4,0.3) tau <- 8 FD.density(x,alpha,prob,tau)
Estimates the vector of parameters of a Flexible Dirichlet distribution through an EM-based maximum likelihood approach.
FD.estimation(data, normalize = F, iter.initial.SEM = 50, iter.final.EM = 100, verbose = T)
FD.estimation(data, normalize = F, iter.initial.SEM = 50, iter.final.EM = 100, verbose = T)
data |
a matrix or a dataframe containing only the variables in the model. Rows must sum to one, or |
normalize |
if |
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 |
The procedure is made up of four stages:
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.
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.
Initial SEM: A Stochastic E-M algorithm is applied at every initial partition and every possible label permutation identified.
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.
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
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.
FD.generate
, FD.stddev
, FD.aicbic
, FD.barycenters
, FD.ternaryplot
, FD.rightplot
, FD.marginalplot
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)
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)
Random generation from the Flexible Dirichlet distribution with parameters a
, p
and t
.
FD.generate(n, a, p, t)
FD.generate(n, a, p, t)
n |
number of points on the simplex to be generated. |
a |
vector of the non-negative alpha parameters. |
p |
vector of the clusters' probabilities. It must sum to one. |
t |
non-negative scalar tau parameter. |
Vectors a
and p
must be of the same length.
The Flexible Dirichlet distribution derives from the normalization of a basis of positive dependent random variables obtained by starting from a basis of independent equally scaled gamma random variables, and randomly allocating to the i
-th element a further independent gamma random variable.
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, 1–21.
FD.estimation
, FD.density
, FD.theorcontours
, FD.subcomposition
, FD.amalgamation
n <- 100 alpha <- c(12,7,15) prob <- c(0.3,0.4,0.3) tau <- 8 data <- FD.generate(n,alpha,prob,tau) data
n <- 100 alpha <- c(12,7,15) prob <- c(0.3,0.4,0.3) tau <- 8 data <- FD.generate(n,alpha,prob,tau) data
Histogram of the observed marginal variable and estimated density function of the marginal variable of a fitted Flexible Dirichlet distribution.
FD.marginalplot(x, var, zoomed = T, showgrid = T, showdata = T)
FD.marginalplot(x, var, zoomed = T, showgrid = T, showdata = T)
x |
an object of class FDfitted, usually the result of |
var |
position of the variable to be plotted. |
zoomed |
if |
showgrid |
if |
showdata |
if |
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.
FD.estimation
, FD.ternaryplot
, FD.rightplot
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 FD.marginalplot(results, var=2) FD.marginalplot(results, var=2, zoomed=FALSE, showgrid=TRUE, showdata=FALSE)
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 FD.marginalplot(results, var=2) FD.marginalplot(results, var=2, zoomed=FALSE, showgrid=TRUE, showdata=FALSE)
Moments of a fitted Flexible Dirichlet distribution. The function returns the mean and variance vectors and the covariance and correlation matrices.
FD.moments(x)
FD.moments(x)
x |
an object of class FDfitted, usually the result of |
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.
FD.estimation
, FD.barycenters
, FD.clusterdistances
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 FD.moments(results)
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 FD.moments(results)
Given a matrix or a numeric dataframe, this function returns a composition (i.e. data summing up to 1).
FD.normalization(data)
FD.normalization(data)
data |
a matrix or a dataframe containing only variables to be transformed into compositional variables. |
Values must be positive. In case one row-entry (or more) is NA, the whole row will be returned as NA.
FD.generate
, FD.subcomposition
, FD.amalgamation
data(oliveoil) dataoil <- oliveoil head(dataoil) data <- FD.normalization(dataoil[,3:10]) head(data) data.sub <- FD.subcomposition(data,c(1,3,4,5)) head(data.sub) data.amalg <- FD.amalgamation(data,c(2,6,7,8),name='others') head(data.amalg)
data(oliveoil) dataoil <- oliveoil head(dataoil) data <- FD.normalization(dataoil[,3:10]) head(data) data.sub <- FD.subcomposition(data,c(1,3,4,5)) head(data.sub) data.amalg <- FD.amalgamation(data,c(2,6,7,8),name='others') head(data.amalg)
Right triangle plot and contour lines of the density function of a fitted Flexible Dirichlet distribution.
FD.rightplot(x, var = c(1, 2), zoomed = T, showgrid = T, showdata = T, nlevels = 10)
FD.rightplot(x, var = c(1, 2), zoomed = T, showgrid = T, showdata = T, nlevels = 10)
x |
an object of class FDfitted, usually the result of |
var |
numeric vector containing the two variables to be plotted on the axis. |
zoomed |
if |
showgrid |
if |
showdata |
if |
nlevels |
approximate number of contour lines to be drawn. |
The number of variables in the fitted model must be 3 to draw a plot on the right triangle.
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.
FD.estimation
, FD.ternaryplot
, FD.marginalplot
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 FD.rightplot(results) FD.rightplot(results, var=c(3,2), zoomed=FALSE, showgrid=TRUE, showdata=FALSE, nlevels=3)
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 FD.rightplot(results) FD.rightplot(results, var=c(3,2), zoomed=FALSE, showgrid=TRUE, showdata=FALSE, nlevels=3)
Conditional Bootstrap evaluation of the standard errors of the maximum likelihood parameter estimates of a Flexible Dirichlet distribution.
FD.stddev(x, iter.bootstrap = 500)
FD.stddev(x, iter.bootstrap = 500)
x |
an object of class FDfitted, usually the result of |
iter.bootstrap |
number of iterations of the Bootstrap. |
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.
FD.estimation
, FD.aicbic
, FD.barycenters
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 FD.stddev(results)
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 FD.stddev(results)
Given a matrix or a numeric dataframe, this function returns a subcomposition made up of the specified columns.
FD.subcomposition(data, columns)
FD.subcomposition(data, columns)
data |
a matrix or a dataframe containing only variables in the model. |
columns |
numeric vector containing the position of the columns to keep in the new composition. |
Values must be positive. In case one row-entry (or more) is NA, the whole row will be returned as NA.
FD.generate
, FD.amalgamation
, FD.normalization
data(oliveoil) dataoil <- oliveoil head(dataoil) data <- FD.normalization(dataoil[,3:10]) head(data) data.sub <- FD.subcomposition(data,c(1,3,4,5)) head(data.sub) data.amalg <- FD.amalgamation(data,c(2,6,7,8),name='others') head(data.amalg)
data(oliveoil) dataoil <- oliveoil head(dataoil) data <- FD.normalization(dataoil[,3:10]) head(data) data.sub <- FD.subcomposition(data,c(1,3,4,5)) head(data.sub) data.amalg <- FD.amalgamation(data,c(2,6,7,8),name='others') head(data.amalg)
Ternary plot and contour lines of the density function of a fitted Flexible Dirichlet distribution.
FD.ternaryplot(x, zoomed = T, showgrid = T, showdata = T, nlevels = 10)
FD.ternaryplot(x, zoomed = T, showgrid = T, showdata = T, nlevels = 10)
x |
an object of class FDfitted, usually the result of |
zoomed |
if |
showgrid |
if |
showdata |
if |
nlevels |
approximate number of contour lines to be drawn. |
The number of variables in the fitted model must be 3 to draw a ternary plot.
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.
FD.estimation
, FD.rightplot
, FD.marginalplot
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 FD.ternaryplot(results) FD.ternaryplot(results, zoomed=FALSE, showgrid=TRUE, showdata=FALSE, nlevels=3)
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 FD.ternaryplot(results) FD.ternaryplot(results, zoomed=FALSE, showgrid=TRUE, showdata=FALSE, nlevels=3)
Contour lines of a Flexible Dirichlet with given parameters on the ternary diagram or on the right triangle.
FD.theorcontours(a, p, t, type = "ternary", var = c(1, 2), zoomed = T, showgrid = T, nlevels = 10)
FD.theorcontours(a, p, t, type = "ternary", var = c(1, 2), zoomed = T, showgrid = T, nlevels = 10)
a |
vector of the non-negative alpha parameters. |
p |
vector of the clusters' probabilities. It must sum to one. |
t |
non-negative scalar tau parameter. |
type |
string indicating whether to plot the contour lines on a ternary diagram |
var |
numeric vector containing the two variables to be plotted on the axis. Used only if |
zoomed |
if |
showgrid |
if |
nlevels |
approximate number of contour lines to be drawn. |
The number of variables in the Flexible Dirichlet must be 3 to draw a plot. Vectors a
and p
must be of the same length.
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.
alpha <- c(12,7,15) prob <- c(0.3,0.4,0.3) tau <- 8 FD.theorcontours(alpha,prob,tau) FD.theorcontours(alpha,prob,tau, type='right', var=c(3,2), zoomed=FALSE, showgrid=TRUE, nlevels=3)
alpha <- c(12,7,15) prob <- c(0.3,0.4,0.3) tau <- 8 FD.theorcontours(alpha,prob,tau) FD.theorcontours(alpha,prob,tau, type='right', var=c(3,2), zoomed=FALSE, showgrid=TRUE, nlevels=3)
This data set represents eight chemical measurements on different specimen of olive oil produced in various regions in Italy (northern Apulia, southern Apulia, Calabria, Sicily, inland Sardinia and coast Sardinia, eastern and western Liguria, Umbria) and further classifiable into three macro-areas: Centre-North, South, Sardinia.
This data frame contains 572 rows, each corresponding to a different specimen of olive oil, and 10 columns. The first and the second column correspond to the macro-area and the region of origin of the olive oils respectively; here, the term 'region' refers to a geographical area and only partially to administrative borders. Columns 3-10 represent the following eight chemical measurements on the acid components for the oil specimens: palmitic, palmitoleic, stearic, oleic, linoleic, linolenic, arachidic, eicosenoic.
Originally included in the package pdfCluster.
This method plots the results of FD.estimation
, using the functions FD.ternaryplot
or FD.rightplot
.
## S3 method for class 'FDfitted' plot(x, type = "ternary", var = c(1, 2), zoomed = T, showgrid = T, showdata = T, nlevels = 10, ...)
## S3 method for class 'FDfitted' plot(x, type = "ternary", var = c(1, 2), zoomed = T, showgrid = T, showdata = T, nlevels = 10, ...)
x |
an object of class FDfitted, usually the result of |
type |
string containing |
var |
numeric vector containing the two variables to be plotted on the axis. Used only if |
zoomed |
if |
showgrid |
if |
showdata |
if |
nlevels |
approximate number of contour lines to be drawn. |
... |
additional arguments |
The number of variables in the fitted model must be 3 to draw a plot.
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.
FD.estimation
, FD.ternaryplot
, FD.rightplot
, FD.marginalplot
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 plot(results) plot(results, type='right', var=c(3,2), zoomed=FALSE, showgrid=TRUE, showdata=FALSE, nlevels=3)
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 plot(results) plot(results, type='right', var=c(3,2), zoomed=FALSE, showgrid=TRUE, showdata=FALSE, nlevels=3)
This method shows the results of FD.estimation
.
## S3 method for class 'FDfitted' print(x, ...)
## S3 method for class 'FDfitted' print(x, ...)
x |
an object of class FDfitted, usually the result of |
... |
additional arguments |
This method summarizes the results of FD.estimation
, adding also information from the functions FD.stddev
and FD.aicbic
.
## S3 method for class 'FDfitted' summary(object, ...)
## S3 method for class 'FDfitted' summary(object, ...)
object |
an object of class FDfitted, usually the result of |
... |
additional arguments |
A list composed by:
par
Estimated parameter vector
sd
Vector of the estimated standard deviations
goodness
Vector containing LogLikelihood, AIC and BIC
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.
FD.estimation
, FD.stddev
, FD.aicbic
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)
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)