public class GLMPoisson extends Object implements GLMExponentialDistribution
poisson
.Constructor and Description |
---|
GLMPoisson() |
Modifier and Type | Method and Description |
---|---|
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)
Over-dispersion 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 μ.
|
public double variance(double mu)
GLMExponentialDistribution
variance
in interface GLMExponentialDistribution
mu
- the distribution mean, μpublic double theta(double mu)
GLMExponentialDistribution
theta
in interface GLMExponentialDistribution
mu
- the distribution mean, μpublic double cumulant(double theta)
GLMExponentialDistribution
cumulant
in interface GLMExponentialDistribution
theta
- θpublic double deviance(double y, double mu)
GLMExponentialDistribution
D(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.
deviance
in interface GLMExponentialDistribution
y
- an observationmu
- the estimated mean, μ^public double overdispersion(Vector y, Vector mu, int nFactors)
GLMExponentialDistribution
X^2 estimates a(Φ) = Φ, the dispersion parameter (assuming w = 1). For,σ^2 = X^2/(n-p), eq. 4.23 X^2 = sum{(y-μ)^2}/V(μ), p.34 = sum{(y-μ)^2}/b''(θ), p.29
GLMGamma
,
GLMGaussian
,
GLMInverseGaussian
,
over-dispersion is the same as dispersion.overdispersion
in interface GLMExponentialDistribution
y
- an observationmu
- the distribution mean, μnFactors
- the number of factorspublic double dispersion(Vector y, Vector mu, int nFactors)
GLMExponentialDistribution
dispersion
in interface GLMExponentialDistribution
y
- an observationmu
- the distribution mean, μnFactors
- the number of factorspublic double AIC(Vector y, Vector mu, Vector weight, double preLogLike, double deviance, int nFactors)
GLMExponentialDistribution
AIC
in interface GLMExponentialDistribution
y
- an observationmu
- the distribution mean, μweight
- the weights assigned to the observationspreLogLike
- sum of (yi * θi - b(θi))deviance
- the deviancenFactors
- the number of factorsCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.