<< boxcoxestimate Box-Cox boxcoxloglikelihood >>

stixbox >> stixbox > Box-Cox > boxcoxinverse

boxcoxinverse

Inverse Box-Cox transformation

Calling Sequence

data = boxcoxinverse(transdat,lambda)

Parameters

transdat :

a m-by-1 matrix of doubles, the transformed data

lambda :

a m-by-1 matrix of doubles, the lambda parameter

data :

a m-by-1 matrix of doubles, greater or equal to zero, the data

Description

boxcoxinverse applies the inverse Box-Cox transformation.

The inverse Box-Cox transformation is defined by

\begin{eqnarray}
x=\left(\lambda y + 1\right)^{1/\lambda}
\end{eqnarray}

if lambda is nonzero and

\begin{eqnarray}
x=\exp(y)
\end{eqnarray}

if lambda=0.

Uses a robust implementation which is accurate even when lambda is close to zero.

Transformed data points for which the inverse does not exist (i.e. when lambda*y+1<0 ) generate NAN floating point numbers.

Examples

transdat=[0. 0.8921497 1.6538133 2.3414512 2.9788133]
lambda=0.7
data = boxcoxinverse(transdat,lambda)

// Check accuracy when lambda is close to zero
data=boxcoxinverse(0.15,1.e-20)
exact=1.1618342427282831226

// See when the inverse transformation does not exist
data = boxcoxinverse(-4:1,0.7)

Authors


Report an issue
<< boxcoxestimate Box-Cox boxcoxloglikelihood >>