mleLR {countprop} | R Documentation |
Maximum Likelihood Estimate for multinomial logit-normal model
Description
Returns the maximum likelihood estimates of multinomial logit-normal model parameters given a count-compositional dataset. The MLE procedure is based on the multinomial logit-Normal distribution, using the EM algorithm from Hoff (2003).
Usage
mleLR(
y,
max.iter = 10000,
max.iter.nr = 100,
tol = 1e-06,
tol.nr = 1e-06,
lambda.gl = 0,
gamma = 0.1,
verbose = FALSE
)
Arguments
y |
Matrix of counts; samples are rows and features are columns. |
max.iter |
Maximum number of iterations |
max.iter.nr |
Maximum number of Newton-Raphson iterations |
tol |
Stopping rule |
tol.nr |
Stopping rule for the Newton-Raphson algorithm |
lambda.gl |
Penalization parameter lambda, for the graphical lasso penalty. Controls the sparsity of Sigma |
gamma |
Gamma value for EBIC calculation of the log-likelihood |
verbose |
If TRUE, print information as the functions run |
Value
The additive log-ratio of y (v
); maximum likelihood estimates of
mu
, Sigma
, and Sigma.inv
;
the log-likelihood (log.lik
); the EBIC (extended Bayesian information criterion)
of the log-likelihood of the multinomial logit-Normal model with the
graphical lasso penalty (ebic
); degrees of freedom of the Sigma.inv
matrix (df
).
Note
The graphical lasso penalty
is the sum of the absolute value of the elements of the covariance matrix Sigma
.
The penalization parameter lambda controls the sparsity of Sigma.
This function is also used within the mlePath()
function.
Examples
data(singlecell)
mle <- mleLR(singlecell)
mle$mu
mle$Sigma
mle$ebic