rsp {dsfa} | R Documentation |
Response function and inverse response function (link function).
rsp(x, link = "identity", a = 0, b = 1, inv = FALSE, deriv = 0)
x |
vector of quantiles. |
link |
specifying the type of link function. |
a |
numeric min value for |
b |
numeric max value for |
inv |
logical; if TRUE, evaluate link function and its derivatives. |
deriv |
derivative of order |
The link functions are defined as follows:
identitity
: g(x)=x
and thus the response function is g^{-1}(x)=x
.
log
: g(x)=log(x)
and thus the response function is g^{-1}(x)=exp(x)
.
glogit
: g(x)=log(\frac{x-a}{b-a}/(1-\frac{x-a}{b-a}))
and thus the response function is g^{-1}(x)=\frac{exp(x)}{1+exp(x)} \cdot (b-a)+a
.
Mostly internal function. Returns a vector of the corresponding function evaluated at x with its derivatives.
rsp(x=5, link="glogit", a=0, b=1, inv=FALSE, deriv=4)
rsp(x=0.5, link="glogit", a=0, b=1, inv=TRUE, deriv=4)