|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.probdistmulti.DiscreteDistributionIntMulti umontreal.iro.lecuyer.probdistmulti.NegativeMultinomialDist
public class NegativeMultinomialDist
Implements the class DiscreteDistributionIntMulti
for the
negative multinomial distribution with parameters n > 0 and
(
p1,…, pd) such that all 0 < pi < 1 and
∑i=1dpi < 1.
The probability mass function is
Constructor Summary | |
---|---|
NegativeMultinomialDist(double n,
double[] p)
Creates a NegativeMultinomialDist object with parameters n and (p1, ..., pd) such that ∑i=1dpi < 1, as described above. |
Method Summary | |
---|---|
static double |
cdf(double n,
double[] p,
int[] x)
Computes the cumulative probability function F of the negative multinomial distribution with parameters n and (p1, ..., pk), evaluated at x. |
double[][] |
getCorrelation()
Returns the correlation matrix of the distribution, defined as ρij = σij/(σ_iiσ_jj)1/2. |
static double[][] |
getCorrelation(double n,
double[] p)
Computes the correlation matrix of the negative multinomial distribution with parameters n and (p1, ..., pd). |
double[][] |
getCovariance()
Returns the variance-covariance matrix of the distribution, defined as σij = E[(Xi - μi)(Xj - μj)]. |
static double[][] |
getCovariance(double n,
double[] p)
Computes the covariance matrix of the negative multinomial distribution with parameters n and (p1, ..., pd). |
double |
getGamma()
Returns the parameter n of this object. |
double[] |
getMean()
Returns the mean vector of the distribution, defined as μi = E[Xi]. |
static double[] |
getMean(double n,
double[] p)
Computes the mean E[X] = npi/p0 of the negative multinomial distribution with parameters n and (p1, ..., pd). |
static double[] |
getMLE(int[][] x,
int m,
int d)
Estimates and returns the parameters [hat(n), hat(p)1, ..., hat(p)d] of the negative multinomial distribution using the maximum likelihood method. |
static double |
getMLEninv(int[][] x,
int m,
int d)
Estimates and returns the parameter ν = 1/hat(n) of the negative multinomial distribution using the maximum likelihood method. |
double[] |
getP()
Returns the parameters (p1, ..., pd) of this object. |
static double |
prob(double n,
double[] p,
int[] x)
Computes the probability mass function of the negative multinomial distribution with parameters n and (p1, ..., pd), evaluated at x. |
double |
prob(int[] x)
Returns the probability mass function p(x1, x2,…, xd), which should be a real number in [0, 1]. |
void |
setParams(double n,
double[] p)
Sets the parameters n and (p1, ..., pd) of this object. |
Methods inherited from class umontreal.iro.lecuyer.probdistmulti.DiscreteDistributionIntMulti |
---|
cdf, getDimension |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NegativeMultinomialDist(double n, double[] p)
Method Detail |
---|
public double prob(int[] x)
DiscreteDistributionIntMulti
prob
in class DiscreteDistributionIntMulti
x
- value at which the mass function must be evaluated
public double[] getMean()
DiscreteDistributionIntMulti
getMean
in class DiscreteDistributionIntMulti
public double[][] getCovariance()
DiscreteDistributionIntMulti
getCovariance
in class DiscreteDistributionIntMulti
public double[][] getCorrelation()
DiscreteDistributionIntMulti
getCorrelation
in class DiscreteDistributionIntMulti
public static double prob(double n, double[] p, int[] x)
public static double cdf(double n, double[] p, int[] x)
public static double[] getMean(double n, double[] p)
public static double[][] getCovariance(double n, double[] p)
public static double[][] getCorrelation(double n, double[] p)
public static double[] getMLE(int[][] x, int m, int d)
x
- the list of observations used to evaluate parametersm
- the number of observations used to evaluate parametersd
- the dimension of each vector
public static double getMLEninv(int[][] x, int m, int d)
x
- the list of observations used to evaluate parametersm
- the number of observations used to evaluate parametersd
- the dimension of each vector
public double getGamma()
public double[] getP()
public void setParams(double n, double[] p)
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |