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

  • exp4: $(4x)$, inverse is $(x)/4$

  • exp2: $(2x)$, inverse is $(x)/2$

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

  • identity: Identity function, no transformation

  • exp: $(x)$, inverse is $(x)$

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

  • square: $x^2$, inverse is $(x)$

  • log: $(x)$, inverse is $(x)$

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