search for: mycholinv

Displaying 1 result from an estimated 1 matches for "mycholinv".

2007 Nov 15
1
Nested SEXP functions
...looking at the Gaussian kernel: l(beta) = (y-X*beta)^T V^{-1} (y-X*beta) Now in order to accomplish this, I wrote various linear algebra subroutines to handle the R objects, we'll call this: SEXP XtimesY(SEXP X,SEXP Y); // X*Y SEXP XminusY(SEXP X,SEXP Y); // X-Y SEXP tX(SEXP X); // X^T SEXP mycholinv(SEXP V); // Use cholesky decomposition for inverse Now, what I'm noticing is that if I call each routine individually such as: pt1=XtimesY(X,beta); // X*beta pt2=Xminus(Y,pt1); // Y-X*beta pt3=tX(pt2); // (Y-X*beta)^T pt4=mycholinv(V); //V^{-1} pt5=XtimesY(pt2,pt4); // (Y-X*beta)^T V^{-1} res...