Description Usage Arguments Value Author(s) Examples
Choose a function and inverse based on a text string; check whether two functions actually are each others inverse.
1 2 3 | choose.trans( tr )
check.trans( trans, y, trans.tol = 1e-05 )
|
tr |
A character string, or a list of two functions, they should be each other's inverse. Names of the list are ignored. |
trans |
A list of two functions, each other's inverse. |
y |
Vector of numerical values where the functions should be each other's inverse. |
trans.tol |
Numerical constant indication how precise the evaulation should be. |
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.
check.trans
returns nothing.
Bendix Carstensen, Steno Diabetes Center, http://www.biostat.ku.dk/~bxc.
1 | choose.trans( "logit" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.