Skip to contents

This function converts a transformation name to the corresponding function. Convertion is from original scale to real scale by default. Available transformations:

  • exp4: \(exp(4x)\), inverse is \(log(x)/4\)

  • exp2: \(exp(2x)\), inverse is \(log(x)/2\)

  • tanh: Hyperbolic tangent transformation used for AR1 parameter, uses ar1_th2a and ar1_a2th

  • identity: Identity function, no transformation

  • exp: \(exp(x)\), inverse is \(log(x)\)

  • sqrt: \(sqrt(x)\), inverse is \(x^2\)

  • square: \(x^2\), inverse is \(sqrt(x)\)

  • log: \(log(x)\), inverse is \(exp(x)\)

Usage

name2fun(trans, inv = FALSE)

Arguments

trans

Character string specifying the transformation type from original scale to real scale

inv

Logical, if TRUE returns the transformation function from real scale to original scale

Value

A function that applies the specified transformation