def dlogpdf_dlink(self, link_f, y, Y_metadata=None):
<EOL>c = np.zeros_like(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>y_link_f_r = np.clip(y**self.r, <NUM_LIT>, <NUM_LIT>) / np.clip(link_f**self.r, <NUM_LIT>, <NUM_LIT>)<EOL>uncensored = (<NUM_LIT:1>-c)*self.r*(y_link_f_r - <NUM_LIT:1>)/(link_f*(<NUM_LIT:1> + y_link_f_r))<EOL>censored = c*(self.r*y_link_f_r/(link_f*y_link_f_r + link_f))<EOL>return uncensored + censored<EOL>
Gradient of the log likelihood function at y, given link(f) w.r.t link(f)

.. math::

:param link_f: latent variables (f)
:type link_f: Nx1 array
:param y: data
:type y: Nx1 array
:param Y_metadata: includes censoring information in dictionary key 'censored'
:returns: gradient of likelihood evaluated at points
:rtype: Nx1 array