I have a rather complex non-linear mixed model. It's intended to model exponentially decaying responses to transient events in animal behaviour experiments. In addition, I've used latent variables to model a non-Gaussian $\text{AR}(1)$ residual error process, as serial correlation is a serious issue with my data as the responses I'm interested in are short in duration. I've implemented this in TMB in R.

When I was testing this on simulated data, the model would never fit correctly. Patterns from the exponential response would consistently be mistaken for the $\text{AR}(1)$ process.

Assuming that serial correlation only results in a bias of residual error variance estimation, not the parameter estimates themselves, $\beta$, I tried fitting the model in two steps:

  1. Fit the initial mixed model, assuming no AR(1) process is present. As expected, this resulted in accurate $\beta$ estimates, but erroneous residual errors when compared to my simulation parameters.

  2. I then refit the model, holding the $\beta$ paramaters fixed and the random effects, and only estimated the terms related to residual error and $\text{AR}(1)$ terms.

Using this process, my model consistently estimated the correct $\beta$ and $\text{AR}(1)$ when testing in simulated data that met the assumptions of my model. I then use parametric bootstrapping to generate confidence intervals and hypothesis testing.


So this feels like a very hackey way to make a model fit... but it appears to match well with my simulation parameters. While the results look right, I was wondering if there may be other theoretical issues that I'm overlooking.

My questions are...

  • Are there any reasons as to why I shouldn't estimate my model parameters in 2 fitting steps?
  • Are there examples of models which do fit their parameters in 2 separate steps?
  • 2
    $\begingroup$ Sometimes yo do have to hack around - seems like a good approach to me ! $\endgroup$ – Robert Long Jul 24 '20 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.