tBoxCox: Box-Cox Transformation with Interpolated Parameter lambda

Description Usage Arguments Value Author(s) Examples

View source: R/animatoR-functions-knitr.R

Description

Transform data using the Box-Cox transformation with parameter lambda interpolated between start and end value.

Usage

1
tBoxCox(x, lambda0, lambda1 = lambda0, t, when, p)

Arguments

x

numerical vector.

lambda0

numeric, starting value of parameter lambda.

lambda1

numeric, end value of parameter lambda.

t

numeric, homotopy parameter, limited between 0 and 1. This parameter can be considered as fraction of animation duration time.

when

numeric vector. This parameter controls the times of: entrance, exit, start of movement and, end of movement.

p

numeric, homotopy power parameter. Defaults to 1.

Value

numerical vector, Box-Cox transformed values for current interpolated value of lambda.

Author(s)

Andrej Blejec andrej.blejec@nib.si

Examples

1
2
3
4
5
6
7
8
9
if(interactive()) {
 x <- runif(250,1,3)
 for (t in seq(0,1,length=100)){
 newplot(xlim=c(0,10),ylim=c(0,1),axes=TRUE,asp=NA)
 xt <- tBoxCox(x,-1,3,t)
 rug(xt)
 lines(density(xt))
 }
}

ablejec/animatoR documentation built on Feb. 21, 2020, 10:09 p.m.