% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generic.R
\name{name2fun}
\alias{name2fun}
\title{Convert transformation name to function}
\usage{
name2fun(trans, inv = FALSE)
}
\arguments{
\item{trans}{Character string specifying the transformation type from original scale to real scale}

\item{inv}{Logical, if TRUE returns the transformation function from real scale to original scale}
}
\value{
A function that applies the specified transformation
}
\description{
This function converts a transformation name to the corresponding function.
Convertion is from original scale to real scale by default.
Available transformations:
\itemize{
  \item \code{exp4}: \eqn{exp(4x)}, inverse is \eqn{log(x)/4}
  \item \code{exp2}: \eqn{exp(2x)}, inverse is \eqn{log(x)/2}
  \item \code{tanh}: Hyperbolic tangent transformation used for AR1 parameter, uses ar1_th2a and ar1_a2th
  \item \code{identity}: Identity function, no transformation
  \item \code{exp}: \eqn{exp(x)}, inverse is \eqn{log(x)}
  \item \code{sqrt}: \eqn{sqrt(x)}, inverse is \eqn{x^2}
  \item \code{square}: \eqn{x^2}, inverse is \eqn{sqrt(x)}
  \item \code{log}: \eqn{log(x)}, inverse is \eqn{exp(x)}
}
}
