Skip to content

BUG family Gaussian.loglike power link #1778

Closed

Description

@josef-pkt

dead code

Power link is not allowed (why not?)
self.fitted is not defined
doesn't take into account that scale is an argument and can be fixed different from MLE

if isinstance(self.link, L.Power) and self.link.power == 1:
        # This is just the loglikelihood for classical OLS
            nobs2 = Y.shape[0]/2.
            SSR = ss(Y-self.fitted(mu))
            llf = -np.log(SSR) * nobs2
            llf -= (1+np.log(np.pi/nobs2))*nobs2
            return llf

Activity

  1. added this to the 0.9 milestone on May 27, 2017
  2. modified the milestones: 0.9, 0.10 on Apr 18, 2018
  3. josef-pkt commented on Apr 18, 2018

    @josef-pkt
    MemberAuthor

    pushing this off to 0.10

    see old PR #1880 to optionally skip valid link check, will need changes to new families, I guess, i.e. Tweedie.

    also: the DomainWarning for the link is in GLM.__init__. I think it should also go into Family._setlink

  4. bashtage commented on Jul 30, 2026

    @bashtage
    Member

    Fixed as part of PR #3856 (the same PR that fixed several other GLM scale/loglike issues): Gaussian.loglike_obs was fully rewritten with no self.fitted reference and no power-link special case. Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions