6.7.10. statsmodels.sandbox.regression.tools

gradient/Jacobian of normal and t loglikelihood

use chain rule

normal derivative wrt mu, sigma and beta

new version: loc-scale distributions, derivative wrt loc, scale

also includes “standardized” t distribution (for use in GARCH)

TODO: * use sympy for derivative of loglike wrt shape parameters

it works for df of t distribution dlog(gamma(a))da = polygamma(0,a) check polygamma is available in scipy.special
  • get loc-scale example to work with mean = X*b
  • write some full unit test examples

A: josef-pktd

6.7.10.1. Functions

locscale_grad(y, loc, scale, dlldy, *args) derivative of log-likelihood with respect to location and scale
mean_grad(x, beta) gradient/Jacobian for d (x*beta)/ d beta
norm_dlldy(y) derivative of log pdf of standard normal with respect to y
norm_lls(y, params) normal loglikelihood given observations and mean mu and variance sigma2
norm_lls_grad(y, params) Jacobian of normal loglikelihood wrt mean mu and variance sigma2
normgrad(y, x, params) Jacobian of normal loglikelihood wrt mean mu and variance sigma2
ts_dlldy(y, df) derivative of log pdf of standard t with respect to y
ts_lls(y, params, df) t loglikelihood given observations and mean mu and variance sigma2 = 1
tstd_dlldy(y, df) derivative of log pdf of standardized t with respect to y
tstd_lls(y, params, df) t loglikelihood given observations and mean mu and variance sigma2 = 1
tstd_pdf(x, df) pdf for standardized (not standard) t distribution, variance is one