treat tilde and logpdf for gradient (derivation TBD)