# Maximum likelihood estimation of a 3-parameter logistic function using statsmodels

I would like to fit a 3-parameter logistic function to data using maximum likelihood estimation via statsmodels (and/or pymc3). The logistic function is defined as follows:

$p=\lambda&space;+(1-2\lambda)/(1+e^{-\beta(x-\alpha)})$

I am stuck because I don't know the formula of the negative log-likelihood that needs to be minimized. I would be grateful if someone would explain how to compute this formula, and implement it within statsmodels (or pymc3).