DMD.DM.fit {MGLM}R Documentation

Fit multivariate discrete distributions

Description

Fit the specified multivariate discrete distribution.

Usage

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
)

Arguments

data

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.

init

an optional vector of initial value of the parameter estimates. Should have the same dimension as the estimated parameters. See dist for details.

weight

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.

epsilon

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.

maxiters

an optional number controlling the maximum number of iterations. The default value is maxiters=150.

display

an optional logical variable controlling the display of iterations. The default value is FALSE.

dist

a description of the distribution to fit. Choose from "MN", "DM", "GDM", "NegMN". See dist for details.

Details

See dist for details about model parameterization.

Value

Returns an object of S4 class "MGLMfit". An object of class "MGLMfit" is a list containing at least the following components:

Author(s)

Yiwen Zhang and Hua Zhou

Examples

data(rnaseq)
Y <- as.matrix(rnaseq[, 1:6])
fit <- MGLMfit(data=Y, dist="GDM") 



[Package MGLM version 0.2.1 Index]