def dlogpdf_dlink_dr(self, inv_link_f, y, Y_metadata=None):
<EOL>c = np.zeros_like(y)<EOL>if Y_metadata is not None and '<STR_LIT>' in Y_metadata.keys():<EOL><INDENT>c = Y_metadata['<STR_LIT>']<EOL><DEDENT>link_f = inv_link_f<EOL>y_link_f = y/link_f<EOL>y_link_f_r = y_link_f**self.r<EOL>log_y_link_f = np.log(y) - np.log(link_f)<EOL>censored = c*(y_link_f_r*(y_link_f_r + self.r*log_y_link_f + <NUM_LIT:1>)/(link_f*(y_link_f_r + <NUM_LIT:1>)**<NUM_LIT:2>))<EOL>uncensored = (<NUM_LIT:1>-c)*(y_link_f**(<NUM_LIT:2>*self.r) + <NUM_LIT:2>*self.r*y_link_f_r*log_y_link_f - <NUM_LIT:1>) / (link_f*(<NUM_LIT:1> + y_link_f_r)**<NUM_LIT:2>)<EOL>dlogpdf_dlink_dr = censored + uncensored<EOL>return dlogpdf_dlink_dr<EOL>
Derivative of the dlogpdf_dlink w.r.t shape parameter

.. math::

:param inv_link_f: latent variables inv_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: Nx1 array