'assumes data is 1d, univariate time series
formula from sitmo'

def fitls(self, data, dt):

    nobs = (len(data) - 1)
    exog = np.column_stack((np.ones(nobs), data[:(-1)]))
    (parest, res, rank, sing) = np.linalg.lstsq(exog, data[1:])
    (const, slope) = parest
    errvar = (res / (nobs - 2.0))
    lambd = ((- np.log(slope)) / dt)
    sigma = np.sqrt((((((- errvar) * 2.0) * np.log(slope)) / (1 - (slope ** 2))) / dt))
    mu = (const / (1 - slope))
    return (mu, lambd, sigma)
