We describe several methods of streamlining the optimization of the REML and/or the maximum-likelihood parameter estimation criteria for linear mixed-effects models. First, we condition on the ratio of the variance components or, in general, the relative precision factors. Conditional on these values, the criteria can be easily calculated after a penalized least squares problem, which is a non-iterative calculation. When optimizing this profiled log-likelihood or restricted log-likelihood with respect to the parameters in the relative precision factor, the dimension of the optimization problem is considerably reduced. By taking advantage of the special structure of the penalized least squares problem the amount of information that must be stored and the amount of computation to be performed can be substantially reduced. Second, we use the matrix-logarithm parameterization for the relative precision factors to provide a more stable optimization problem. Third, we derive both the EM and the Newton-Raphson updates so the optimization method can begin with the EM iterations then switch to the Newton-Raphson updates when near the optimum.
All of these techniques can also be used in the optimization of the estimation criteria in nonlinear mixed-effects models. These methods are implemented in the 3.1 version of the NLME library for the S-PLUS and R statistical software packages.