def link ( self , mu , dist ) : return np . log ( mu ) - np . log ( dist . levels - mu )
what glm to model lognormal distribution python
glm link function this is useful for going from mu to the linear prediction
def link(self, mu, dist):
        """
        glm link function
        this is useful for going from mu to the linear prediction

        Parameters
        ----------
        mu : array-like of legth n
        dist : Distribution instance

        Returns
        -------
        lp : np.array of length n
        """
        return np.log(mu) - np.log(dist.levels - mu)