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>uncensored = (<NUM_LIT:1>-c)*(y**self.r*np.log(y)/link_f**<NUM_LIT:2>)<EOL>censored = c*(y**self.r*np.log(y)/link_f**<NUM_LIT:2>)<EOL>dlogpdf_dlink_dr = uncensored + censored<EOL>return dlogpdf_dlink_dr<EOL>
First order derivative derivative of loglikelihood wrt r:shape parameter

:param link_f: latent variables link(f)
:type link_f: Nx1 array
:param y: data
:type y: Nx1 array
:param Y_metadata: Y_metadata which is not used in gamma distribution
:returns: third derivative of likelihood evaluated at points f
:rtype: Nx1 array