Click or drag to resize

BoxCox Class

Class for computing the Box-Cox power tranformations defined for a set of data points, {yi}, and parameter value lambda by yi(lambda) = (yi^lambda - 1)/lambda. In addition methods for computing the corresponding log-likelihood function and the value of lambda which maximizes it are provided.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreBoxCox

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class BoxCox

The BoxCox type exposes the following members.

Constructors
 NameDescription
Public methodBoxCox(DoubleVector) Constructs a BoxCox object for the given data, finding a value of lambda which maximizes the log-likelihood function over the lambda interval LAMBDA_EPSILON.
Public methodBoxCox(DoubleVector, Interval) Constructs a BoxCox object for the given data. A value for lambda which maximizes the log-likelihood function for the given interval for lambda is computed.
Public methodBoxCox(DoubleVector, Interval, Double) Constructs a BoxCox object for the given data. A value for lambda which maximizes the log-likelihood function for the given interval for lambda is computed.
Public methodBoxCox(DoubleVector, Interval, Double, Double) Constructs a BoxCox object for the given data. A value for lambda which maximizes the log-likelihood function for the given interval for lambda is computed. This maximum value is found by manually searching the lambda values lambdaInterval.Min + k*stepSize, k = 0, 1, 2,... and selecting the one which yields the maximum value for the log-likelihood function.
Public methodBoxCox(DoubleVector, Double, Double, Double) Constructs a BoxCox object for the given data. A value for lambda which maximizes the log-likelihood function for the given interval for lambda is computed. This maximum value is found by manually searching the lambda values minLambda + k*stepSize, k = 0, 1, 2,... and selecting the one which yields the maximum value for the log-likelihood function.
Top
Properties
 NameDescription
Public propertyLambda Gets the value of lambda which maximizes the log-likelihood function for the data and lambda interval.
Public propertyLambdaEpsilon Lambda values less than LambdaEpsilon were considered equal to zero.
Public propertyLambdaInterval The interval that was searched for the lambda value that maximized the log-likelihood function.
Public propertyTransformedData The data transformed by the Box Cox transformation yi(lambda) = (yi^lambda - 1)/lambda where lambda is the value of lambda the minimized the log-likelihood function of the sprecified search interval LambdaInterval.
Top
Methods
 NameDescription
Public methodStatic memberLogLikelihood(DoubleVector, Double) Calculates the Box Cox log-likelihood function for the given data and and lambda value.
Public methodStatic memberLogLikelihood(DoubleVector, Double, Double) Calculates the Box Cox log-likelihood function for the given data and and lambda value.
Public methodStatic memberTransform(DoubleVector, Double) Performs the Box Cox transformation transformed data[i] = (data[i]^lambda - 1)/lambda.
Public methodStatic memberTransform(DoubleVector, Double, Double) Performs the Box Cox transformation transformed data[i] = (data[i]^lambda - 1)/lambda.
Top
Fields
 NameDescription
Public fieldStatic memberLAMBDA_EPSILON Default value for lambdaEpsilon. Values for lambda less than lambdaEpsilon are considered to be zero.
Public fieldStatic memberLAMBDA_INTERVAL The default interval to search for a value of lambda maximizing the log-likelihood functions. The default interval is [-5, 5].
Top
See Also