## Topic: Utilities

### Topic Description:

Basic R utilities used in many packages and functions, such as date and string manipulations, statistical distributions, geometry of lines and distances. The R package date is required for the two data functions.

## Function: logistic.power.mode

### Function Description: logistic.power.mode

This is the Gaussian logistic function, where logit is a second-order polynomial of x, but with third parameter the position of the critical point (peak or trough). Given 3 parameters for standard logistic.power, the mode is at -param[2]/2*param[3]). Asymptote and basement are allowed. There must be 1+2*nopredictors parameters; the asympotote and basement are only implemented if extra parameters are passed.

### Function Arguments:

ArgumentDefault Value
x
param
logFALSE
...

### Function Source:

logistic.power.mode=function(x,param,log=FALSE,...)
{
x=as.matrix(x)
nopredictor=dim(x)[2]
a=param[1]
slopeindex=1:(2*nopredictor+1)
b=param[slopeindex][!is.odd(slopeindex)]
b2=param[slopeindex][is.odd(slopeindex)][-1]
b2=(-1)*b/(2*b2)
param[slopeindex][is.odd(slopeindex)][-1]=b2

prob=logistic.power(x=x,param=param,log=log)
return(prob)
}