Learn R Programming

HelpersMG (version 4.2)

flexit: Return the flexit

Description

Return a vector with the probabilities. The flexit equation is not still published : $$if dose < P then (1 + (2^K1 - 1) * exp(4 * S1 * (P - x)))^(-1/K1)$$ $$if dose > P then 1-((1 + (2^K2 - 1) * exp(4 * S2 * (x - P)))^(-1/K2)$$ with: $$S1 = S/((4/K1)*(2^(-K1))^(1/K1+1)*(2^K1-1))$$ $$S2 = S/((4/K2)*(2^(-K2))^(1/K2+1)*(2^K2-1))$$

Usage

flexit(
  x,
  par = NULL,
  P = NULL,
  S = NULL,
  K1 = NULL,
  K2 = NULL,
  zero = 1e-09,
  error0 = 0,
  error1 = 1
)

Arguments

x

The values at which the flexit model must be calculated

par

The vector with P, S, K1, and K2 values

P

P value

S

S value

K1

K1 value

K2

K2 value

zero

Value to replace zero

error0

Value to return if an error is observed toward 0

error1

Value to return if an error is observed toward 1

Value

A vector with the probabilities

Details

Return the flexit value

See Also

Other logit: invlogit(), logit()

Examples

Run this code
# NOT RUN {
n <- flexit(x=1:100, par=c(P=50, S=0.001, K1=0.01, K2=0.02))
n <- flexit(x=1:100, P=50, S=0.001, K1=0.01, K2=0.02)
# }

Run the code above in your browser using DataLab