log_CT_plus {COINr} | R Documentation |

## Log transform a vector (skew corrected)

### Description

Performs a log transform on a numeric vector, but with consideration for the direction of the skew. The aim here is to reduce the absolute value of skew, regardless of its direction.

### Usage

```
log_CT_plus(x, na.rm = FALSE)
```

### Arguments

`x` |
A numeric vector |

`na.rm` |
Set |

### Details

Specifically:

If the skew of `x`

is positive, this performs a modified "COIN Tool log" transform: `log(x-min(x) + a)`

, where
`a <- 0.01*(max(x)-min(x))`

.

If the skew of `x`

is negative, it performs an equivalent transformation `-log(xmax + a - x)`

.

### Value

A log-transformed vector of data, and treatment details wrapped in a list.

### Examples

```
x <- runif(20)
log_CT(x)
```

[Package

*COINr*version 1.1.14 Index]