choose.trans: Functions to handle transformations of measurement results.

Description Usage Arguments Value Author(s) Examples

View source: R/MethComp.R

Description

Choose a function and inverse based on a text string

Usage

1

Arguments

tr

A character string, or a list of two functions, they should be each other's inverse. Names of the list are ignored.

Value

choose.trans returns a named list with two elements "trans" and "inv", both functions which are each other's inverse. This is intended to be stored as an attribute "Transform" with the resulting object and used in plotting and reporting. All results will be on the transformed scale. If the tr argument to choose.trans is a character constant, the appropriate named list of two functions will be generated. Possibilities are: "exp", "log", "logit", "pctlogit" (transforms percentages by the logit), "sqrt", "sq" (square), "cll" (complementary log-minus-log), "ll" (log-minus-log). If there is no match NULL is returned, which will correspond to no transformation.

Author(s)

Bendix Carstensen, Steno Diabetes Center, http://bendixcarstensen.com/.

Examples

1
choose.trans( "logit" )

MethComp documentation built on Jan. 20, 2020, 1:12 a.m.