'Loglikelihood of AR(p) process using conditional sum of squares'

def _loglike_css(self, params):

    nobs = self.nobs
    Y = self.Y
    X = self.X
    ssr = sumofsq((Y.squeeze() - np.dot(X, params)))
    sigma2 = (ssr / nobs)
    return ((((- nobs) / 2) * (np.log((2 * np.pi)) + np.log(sigma2))) - (ssr / (2 * sigma2)))
