|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.regression.linear.glm.distribution.Family
com.numericalmethod.suanshu.stats.regression.linear.glm.distribution.Binomial
public class Binomial
The Binomial distribution for the error distribution in a GLM model.
The R equivalent function is binomial.
| Constructor Summary | |
|---|---|
Binomial()
Construct an instance of Binomial. |
|
Binomial(LinkFunction link)
Construct an instance of Binomial with an overriding link function. |
|
| Method Summary | |
|---|---|
double |
AIC(Vector y,
Vector mu,
Vector weight,
double prelogLike,
double deviance,
int nFactors)
AIC = 2 * #param - 2 * log-likelihood |
double |
cumulant(double theta)
The cumulant function of the exponential distribution. |
double |
deviance(double y,
double mu)
Deviance D(y;μ^) measures the goodness-of-fit of a model, which is defined as the difference between the maximum log likelihood achievable and that achieved by the model. |
double |
dispersion(Vector y,
Vector mu,
int nFactors)
Different distribution models have different ways to compute dispersion, φ. |
double |
overdispersion(Vector y,
Vector mu,
int nFactors)
Overdispersion is the presence of greater variability (statistical dispersion) in a data set than would be expected based on the nominal variance of a given simple statistical model. |
double |
theta(double mu)
The canonical parameter of the distribution in terms of the mean μ. |
double |
variance(double mu)
The variance function of the distribution in terms of the mean μ. |
| Methods inherited from class com.numericalmethod.suanshu.stats.regression.linear.glm.distribution.Family |
|---|
link |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Binomial()
Binomial.
The canonical link is Logit.
public Binomial(LinkFunction link)
Binomial with an overriding link function.
link - the overriding link function| Method Detail |
|---|
public double variance(double mu)
ExponentialDistribution
mu - the distribution mean, μ
μpublic double theta(double mu)
mu - the distribution mean, μ
μpublic double cumulant(double theta)
ExponentialDistribution
theta - the input argument of the cumulant function
public double deviance(double y,
double mu)
FamilyD(y;μ^) = 2 * [l(y;y) - l(μ^;y)]where l is the log-likelihood.
For an exponential family distribution, this is equivalent to
2 * [(y * θ(y) - b(θ(y))) - (y * θ(μ^) - b(θ(μ^)]where b() is the cumulant function of the distribution.
The definition above is the default implementation of this function, a
subclass of ExponentialDistribution may override this
function to implement a simplified expression for efficiency or handle
special values.
deviance in interface ExponentialDistributiondeviance in class Familyy - the observed valuemu - the estimated mean, μ^
public double overdispersion(Vector y,
Vector mu,
int nFactors)
ExponentialDistributionFor, Gamma, Gaussian, InverseGaussian, over-dispersion is the same as dispersion.
mu - μ
public double dispersion(Vector y,
Vector mu,
int nFactors)
ExponentialDistributionNote that in R's output, this is called "over-dispersion".
mu - μ
public double AIC(Vector y,
Vector mu,
Vector weight,
double prelogLike,
double deviance,
int nFactors)
ExponentialDistribution
mu - μprelogLike - sum of y * θi - b(θi)
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||