ModelFamily Class

Represents a family of distributions for the dependent variable in a GeneralizedLinearModel.

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public abstract class ModelFamily
Inheritance
Object  →  ModelFamily

Remarks

Use the ModelFamily class to specify the probability distribution of the errors in a generalized linear model regression analysis.

Set the ModelFamily property of the GeneralizedLinearModel to one of the predefined fields or methods:

MemberDescription
NormalThe dependent variable has a normal distribution. This is the default.
BinomialThe dependent variable has a binomial distribution. This is used for logistic regression.
GammaThe dependent variable has a gamma distribution.
InverseGaussianThe dependent variable has an inverse Gaussian distribution.
NegativeBinomialThe dependent variable has a negative binomial distribution. This is a method that requires the total number of cases as a parameter.
PoissonThe dependent variable has a Poisson distribution. This is used for count data in Poisson regression.

Most of the members of this class are used internally. Two members that may be of interest are the IsLinkFunctionCompatible(LinkFunction) method, which checks if a LinkFunction is compatible with the model family, and the CanonicalLinkFunction property, which returns the canonical link function for the model family.

Constructors

ModelFamilyInitializes a new instance of the ModelFamily class

Properties

CanonicalLinkFunction Gets the canonical link function for the model family.
HasScaleParameter Gets or sets whether the probability distribution contains a scale factor that may be estimated.

Methods

DerivativeOfVarianceFunction Evaluates the derivative of the variance function for the model family.
Deviance Returns the contribution to the deviance of a case.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsLinkFunctionCompatible Returns whether a link function is compatible with the model family.
KernelLogLikelihood Returns the part of the log-likelihood for an observation that depends on the model parameters.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
NegativeBinomial The negative binomial distribution.
RemainderLogLikelihood Returns the part of the log-likelihood for an observation that does not depend on the model parameters.
SquaredDeviance Gets the square of the deviance contribution of a case.
ToStringReturns a string that represents the current object.
(Inherited from Object)
VarianceFunction Evaluates the variance function for the model family.

Fields

Binomial The binomial distribution.
Gamma The gamma distribution.
InverseGaussian The inverse Gaussian or inverse normal distribution.
Normal The Normal distribution. This is the default.
Poisson The Poisson distribution.

See Also