[R-sig-ME] Representation of CHMfactor objects in Matrix package
c.ryan.king at gmail.com
Fri Jun 4 23:16:37 CEST 2010
I'm working a a mixed model problem which is slightly nonstandard, so
I have to do a bit of optimization by hand.
The general problem is that I have to repeatedly cholesky factor matrices like
Identity + C L t(L) C
where L is the cholesky root of a matrix which does not change each
iteration, and C is a diagonal matrix which does depend on parameters.
C is not uniform, so I can not factor it out for a constant multiple
I would like to use the fast update() method for CHMfactor objects
produced by Cholesky() to take care of the Identity part, and the
solve() method for the next stage after I decompose this matrix.
Since C is diagonal, it should be very easy to scale the rows of L and
still be a cholesky root. The problem that I've run into is that I am
not sure about the internal representation of CHMfactor objects.
I understand the @x, @i, @p slots which code for some sparse matrix,
but I don't know which matrix that is.
How the @perms translate into the P matrix is also not clear to me.
Many of the remaining slots do not appear in the manual.
Sorry if this is just me being clumsy at S4. Right now I just chol()
the above matrix at each step, which is unnecessarily slow.
University of Chicago, Department of Health Studies
More information about the R-sig-mixed-models