def d3logpdf_dlink3(self, inv_link_f, y, Y_metadata=None):
assert np.atleast_1d(inv_link_f).shape == np.atleast_1d(y).shape<EOL>state = np.seterr(divide='<STR_LIT:ignore>')<EOL>d3logpdf_dlink3 = np.where(y==<NUM_LIT:1>, <NUM_LIT>/(inv_link_f**<NUM_LIT:3>), -<NUM_LIT>/((<NUM_LIT:1.>-inv_link_f)**<NUM_LIT:3>))<EOL>np.seterr(**state)<EOL>return d3logpdf_dlink3<EOL>
Third order derivative log-likelihood function at y given inverse link of f w.r.t inverse link of f

.. math::
    \\frac{d^{3} \\ln p(y_{i}|\\lambda(f_{i}))}{d^{3}\\lambda(f)} = \\frac{2y_{i}}{\\lambda(f)^{3}} - \\frac{2(1-y_{i}}{(1-\\lambda(f))^{3}}

:param inv_link_f: latent variables passed through inverse link of f.
:type inv_link_f: Nx1 array
:param y: data
:type y: Nx1 array
:param Y_metadata: Y_metadata not used in bernoulli
:returns: third derivative of log likelihood evaluated at points inverse_link(f)
:rtype: Nx1 array