1 

 Migration of lmer from the mer representation to the mer2 
2 

representation and the use of the CHOLMOD code for the sparse 
3 

matrix decomposition. Some of the things that need to be done. 
4 


5 

 Matrices in the mer2 representation are classed matrices, in the 
6 

mer representation they were unclassed. Any parts inside the C 
7 

code that would access, for example, 
8 

REAL(GET_SLOT(x, Matrix_RXXSym)) 
9 

need to be modified to access 
10 

REAL(GET_SLOT(GET_SLOT(x, Matrix_RXXSym), Matrix_xSym)) 
11 

This is especially important for Omega but I think I have done 
12 

those changes already. 
13 


14 

 The components named *X* in an mer object refer to an augmented 
15 

design matrix of p+1 columns. In the mer2 object there are 
16 

separate slots for rZy and rXy. The scalar y'y is the first 
17 

element of devComp. 
18 


19 

 Presently nc is of length nf+1 and the last element is n, the 
20 

number of observations. This value should be moved to devComp and 
21 

nc made of length nf. 
22 


23 

 The slot L is a list of length 1 that contains an ExternalPointer 
24 

to a cholmod_factor object. This contains a permutation which is 
25 

most easily accessible through cholmod_solve(CHOLMOD_P,...) or 
26 

cholmod_solve(CHOLMOD_Pt,...). The ZtX, Zty, RZX and rZy slots actually 
27 

contain P%*%RZX and P%*%rZy 
28 


29 

 
30 
 Sparse matrix methods can now be based on the CHOLMOD package. We 
 Sparse matrix methods can now be based on the CHOLMOD package. We 
31 
will need to migrate from the current code to CHOLMODbased code 
will need to migrate from the current code to CHOLMODbased code 
32 
using #ifdef USE_CHOLMOD. Some of the things to be done 
using #ifdef USE_CHOLMOD. Some of the things to be done 