Re: [R] NumDeriv - derivatives of covariance matrix

2008-04-30 Thread Paul Gilbert
Your calculation can be thought of as a function from R^m to R^(n*n), and functions in numDeriv can be used to calculate a numerical approximation to the derivative of the function. However, the functions in numDeriv try to calculate accurate approximations, as opposed to quick approximations l

[R] NumDeriv - derivatives of covariance matrix

2008-04-29 Thread Daomeng Gao
Hello R-help, I need to compute matrices of first derivatives of a covariance matrix C with entries given by c_ij=theta*exp(-0.5* sum(eta*(x[i,]-x[j,])^2)), wrt to elements of eta, a m-dimensional vector of parameters, given a n*m data matrix x. So far, I have been computing matrices for each para