public class NegativeMultiNomialDistribution extends Distribution implements java.awt.event.ActionListener
Modifier and Type | Field and Description |
---|---|
protected int |
dimension |
protected int |
gamma |
protected int |
k |
protected double[] |
p |
int |
type |
protected int[] |
x |
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name
Constructor and Description |
---|
NegativeMultiNomialDistribution()
This default constructor creates a new MultiNomialDistribution(2, {0.5, 0.5})
|
NegativeMultiNomialDistribution(int gamma,
double[] p)
Creates a NegativeMultinomial Distribution object with parameters
|
NegativeMultiNomialDistribution(int gamma,
double[] p,
int[] x)
This general constructor creates a new NegativeMultiNomialDistribution with specified parameters:
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
This method handles the events associated with the changing the Multinomial probabilities
or x-values.
|
double[][] |
getCorrelation() |
double[][] |
getCovariance() |
double |
getDensity(double x)
Define the Multinomial getDensity function
|
double |
getDensity(int[] x)
This method computes the density function of the Negative Multinomail distribution
|
int |
getGamma()
Returns the parameter gamma of this object.
|
double[] |
getMLE(int[][] x,
int n,
int d)
MLE estimates of the NMD parameters P_hat
|
java.lang.String |
getNegativeMultiNomialTestResults()
This method returns a Text Array with All cumulative Negative-Multinomial results
|
java.lang.String |
getOnlineDescription()
This method returns an online description of this distribution.
|
double[] |
getP()
Returns the parameter vector p of this object.
|
double[] |
getProbabilities()
Returns the parameter gamma of this object.
|
int[] |
getXvalues()
This method gets the array of Negative Multinomail parameters (x-Values[]).
|
int |
getXvaluesSum()
This method gets the array of Multinomail parameters (x-Values[]).
|
void |
initialize()
used for some subclass to initialize before being used
|
void |
setParameters(int gamma,
double[] p,
int[] x)
Sets the parameters gamma and p of this object.
|
void |
valueChanged() |
addObserver, betaCDF, comb, factorial, findGFRoot, findRoot, gamma, gammaCDF, getCDF, getDisplayPane, getDomain, getFailureRate, getGFDerivative, getGFSecondDerivative, getInstance, getLocalHelp, getMaxDensity, getMean, getMean, getMedian, getMGF, getMgfDomain, getName, getPGF, getPGFDomain, getQuantile, getSampleMoment, getSD, getSOCRDistributionFunctors, getSOCRDistributions, getType, getVariance, getVariance, inverseCDF, logGamma, paramEstimate, perm, sampleMean, sampleVar, setApplet, setDomain, setDomain, setMGFDomain, setMGFDomain, setMGFParameters, setMGFParameters, setMGFParameters, setMGFParameters, setParameters, setPGFDomain, setPGFDomain, setPGFParameters, setPGFParameters, setPGFParameters, setPGFParameters, simulate, update, valueChanged
createComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetters
protected int gamma
protected int dimension
protected int k
protected double[] p
protected int[] x
public int type
public NegativeMultiNomialDistribution()
public NegativeMultiNomialDistribution(int gamma, double[] p, int[] x)
n
- Total Sum of X-values (Frequencies)p
- array of Probabilities/likelihoods of all outcomesx
- x-vectorpublic NegativeMultiNomialDistribution(int gamma, double[] p)
gamma
- p
- outcome probabilitiespublic double getDensity(int[] x)
x
- a vector of outcomes ipublic double[][] getCovariance()
public double[][] getCorrelation()
public double[] getMLE(int[][] x, int n, int d)
x
- the list of observations used to evaluate parametersn
- the number of observations used to evaluate parametersd
- the dimension of each vectorpublic int getGamma()
public double[] getProbabilities()
public double[] getP()
public void setParameters(int gamma, double[] p, int[] x)
gamma
- gamma = x[0]double[]
- p probability vectordouble[]
- x frequencies vectorpublic void initialize()
Distribution
initialize
in class Distribution
public void valueChanged()
valueChanged
in class Distribution
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- the action eventpublic int[] getXvalues()
public int getXvaluesSum()
public double getDensity(double x)
getDensity
in class Distribution
public java.lang.String getNegativeMultiNomialTestResults()
public java.lang.String getOnlineDescription()
getOnlineDescription
in class Distribution