Skip to contents

Log transformation with an optional offset (ch. 6 p. 163)

Usage

morie_logtrans(x, offset = 0)

Arguments

x

the series

offset

added before taking logs, the book's remedy for zeros

Value

list(w, mean, sd, cvbefore, cvafter, n)

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_logtrans(V)
#> $w
#> [1] 0.0000000 0.6931472 1.0986123 1.3862944 1.6094379 1.7917595 1.9459101
#> [8] 2.0794415
#> 
#> $mean
#> [1] 1.325575
#> 
#> $sd
#> [1] 0.6579656
#> 
#> $cvbefore
#> [1] 0.5091751
#> 
#> $cvafter
#> [1] 0.4963622
#> 
#> $n
#> [1] 8
#>