Re: [R] The gradient of a multivariate normal density with respect to its parameters

2009-06-22 Thread Karl Ove Hufthammer
Ravi Varadhan skreiv: I am not aware of any. May I ask what your purpose is? You don't really need this if you are going to use it in optimization, since most optimizers use a simple finite-difference approximation if you don't provide the gradient. Using the numerical approximation from "numD

Re: [R] The gradient of a multivariate normal density with respect to its parameters

2009-06-22 Thread Ravi Varadhan
-- -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Karl Ove Hufthammer Sent: Monday, June 22, 2009 10:10 AM To: r-h...@stat.math.ethz.ch Subject: [R] The gradient of a multivariate normal density with respect to its parameters Does a

[R] The gradient of a multivariate normal density with respect to its parameters

2009-06-22 Thread Karl Ove Hufthammer
Does anybody know of a function that implements the derivative (gradient) of the multivariate normal density with respect to the *parameters*? It’s easy enough to implement myself, but I’d like to avoid reinventing the wheel (with some bugs) if possible. Here’s a simple example of the result I’