'Returns the score vector of the profile log-likelihood.
Notes
The score vector that is returned is computed with respect to
the parameterization defined by this model instance\'s
`use_sqrt` attribute.'

def score(self, params, profile_fe=True):

    if (type(params) is not MixedLMParams):
        params = MixedLMParams.from_packed(params, self.k_fe, self.k_re, self.use_sqrt, has_fe=False)
    if profile_fe:
        params.fe_params = self.get_fe_params(params.cov_re, params.vcomp)
    if self.use_sqrt:
        (score_fe, score_re, score_vc) = self.score_sqrt(params, calc_fe=(not profile_fe))
    else:
        (score_fe, score_re, score_vc) = self.score_full(params, calc_fe=(not profile_fe))
    if (self._freepat is not None):
        score_fe *= self._freepat.fe_params
        score_re *= self._freepat.cov_re[self._freepat._ix]
        score_vc *= self._freepat.vcomp
    if profile_fe:
        return np.concatenate((score_re, score_vc))
    else:
        return np.concatenate((score_fe, score_re, score_vc))
