def logpdf_link(self, link_f, y, Y_metadata=None):
assert np.atleast_1d(link_f).shape == np.atleast_1d(y).shape<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>uncensored = (<NUM_LIT:1>-c)* (-<NUM_LIT:0.5>*np.log(<NUM_LIT:2>*np.pi*self.variance) - np.log(y) - (np.log(y)-link_f)**<NUM_LIT:2> /(<NUM_LIT:2>*self.variance) )<EOL>censored = c*np.log( <NUM_LIT:1> - stats.norm.cdf((np.log(y) - link_f)/np.sqrt(self.variance)) )<EOL>logpdf = uncensored + censored<EOL>return logpdf<EOL>
:param link_f: latent variables (link(f))
:type link_f: Nx1 array
:param y: data
:type y: Nx1 array
:param Y_metadata: includes censoring information in dictionary key 'censored'
:returns: likelihood evaluated for this point
:rtype: float