# REML estimation; Assessment of BCB bowhead whales
ADMB Files
Code: bcb.tpl Data: bcb.dat Initial values: bcb.pin Expected Results: bcb.par
| ### Model description Restricted maximum likelihood estimation (REML) is often used to estimate variance parameters in the linear mixed-model: y = X*b + Z*u + e where X and Z are covariate matrices, b are the fixed-effects, u are the random effects and e are the error terms. One way of defining the REML procedure is to: Assign a flat prior to b . Integrate the likelihood with respect to both b and u. The resulting REML likelihood is then maximized with respect to the variance parameters (variances of u and e). To implement this in ADMB-RE we declare both b and u as random effects vectors. As a result, the likelihood is integrated with respect to both parameters. But, while there is a contribution to the objective function comming from the random effects distribution of u, there should be no such contribution from b (i.e. a flat prior). Using this procedure you do not have to derive the "REML correction" to the log-likelihood function by hand. It is done automatically for you by ADMB-RE. ### Example: BCB Bowheads Punt and Zeh (2004, document SC/56/BRG1 presented to the SC of the IWC) combined data from two different counting methodologies in order to estimate the rate of increase of BCB bowhead whales. On a log-scale they fitted a linear mixed-effects models using REML estimates for the variance parameters. This example (bcb.tpl) shows how `random_effects` can be used to obtain REML estimates.