Displaying 1 result from an estimated 1 matches for "kmatder".
Did you mean:
emader
2008 Apr 29
1
NumDeriv - derivatives of covariance matrix
...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 parameter (given
by par[index]) analytically, using the following
kmatder<- function(x, par, index) {
## x: n*m matrix
## par: vector of parameters, m=length(par)=ncol(x)
## compute matrix of partial derivatives wrt parameter par[index]: Cder
= d C/d par[index]
theta<-1
eta<-par
n<-nrow(x)
Cder<-matrix(0,n,n)
for (i in 1:n...