Fit the specified multivariate discrete distribution.
DMD.DM.fit(
data,
init,
weight,
epsilon = 1e-08,
maxiters = 150,
display = FALSE
)DMD.GDM.fit(
data,
init,
weight,
epsilon = 1e-08,
maxiters = 150,
display = FALSE
)
DMD.NegMN.fit(
data,
init,
weight,
epsilon = 1e-08,
maxiters = 150,
display = FALSE
)
MGLMfit(
data,
dist,
init,
weight,
epsilon = 1e-08,
maxiters = 150,
display = FALSE
)
Returns an object of S4 class "MGLMfit". An object of class "MGLMfit" is a list containing at least the following components:
estimatethe vector of the distribution prameter estimates.
SEthe vector of standard errors of the estimates.
vcovthe variance-covariance matrix of the estimates.
logLthe loglikelihood value.
iterthe number of iterations used.
BICBayesian information criterion.
AICAkaike information criterion.
distributionthe distribution fitted.
LRTwhen dist="DM" or "GDM", it is the likelihood ratio test statistic for comparing the current model to the multinomial model. No LRT provided when dist="NegMN".
LRTpvaluethe likelihood ratio test P value.
gradientthe gradient at the estimated parameter values.
DoFthe degrees of freedom of the model.
a data frame or matrix containing the count data. Rows of the matrix represent observations and columns are the categories. Rows and columns of all zeros are automatically removed.
an optional vector of initial value of the parameter estimates. Should have the same dimension as the estimated parameters. See dist for details.
an optional vector of weights assigned to each row of the data. Should be Null or a numeric vector with the length equal to the number of rows of data.
If weight=NULL, equal weights of all ones will be assigned.
an optional numeric controlling the stopping criterion. The algorithm terminates when the relative change in the log-likelihoods of two successive iterates is less than epsilon. The default value is epsilon=1e-8.
an optional number controlling the maximum number of iterations. The default value is maxiters=150.
an optional logical variable controlling the display of iterations. The default value is FALSE.
a description of the distribution to fit. Choose from "MN", "DM", "GDM", "NegMN". See dist for details.
Yiwen Zhang and Hua Zhou
See dist for details about model parameterization.
data(rnaseq)
Y <- as.matrix(rnaseq[, 1:6])
fit <- MGLMfit(data=Y, dist="GDM")
Run the code above in your browser using DataLab