R/bct.R

"bct" <-
function(y,lambda){

  gm <- exp( mean( log(y) ) )

  if(lambda==0) return( log(y)*gm )
  
  yt <- (y^lambda - 1)/( lambda * gm^(lambda-1) )
  return(yt)
}

Try the TeachingDemos package in your browser

Any scripts or data that you put into this service are public.

TeachingDemos documentation built on May 29, 2024, 5:59 a.m.