def dlogpdf_link_dr(self, inv_link_f, y, Y_metadata=None):
c = np.zeros_like(y)<EOL>link_f = inv_link_f<EOL>if Y_metadata is not None and '<STR_LIT>' in Y_metadata.keys():<EOL><INDENT>c = Y_metadata['<STR_LIT>']<EOL><DEDENT>uncensored = (<NUM_LIT:1>-c)* (<NUM_LIT:1.>/self.r + np.log(y) - y**self.r*np.log(y)/link_f)<EOL>censored = (-c*y**self.r*np.log(y)/link_f)<EOL>dlogpdf_dr = uncensored + censored<EOL>return dlogpdf_dr<EOL>
Gradient of the log-likelihood function at y given f, w.r.t shape parameter

.. math::

:param inv_link_f: latent variables link(f)
:type inv_link_f: Nx1 array
:param y: data
:type y: Nx1 array
:param Y_metadata: includes censoring information in dictionary key 'censored'
:returns: derivative of likelihood evaluated at points f w.r.t variance parameter
:rtype: float