# How to account for temporal autocorrelation when computing a Bayes factor between two linear regression models?

I have data of some physiological measure, represented as a vector of 185 measurements taken every 2 seconds. I can model this response in two different ways, and I wish to compare the fit of my two competing models so that I can extract a Bayes factor for the ratio of the likelihoods of obtaining this data given the first or the second model. My approach so far was to fit a BLUE linear regression model to the data (with only one regressor, namely the expected response under the first or the second model), and to use the formula for the log-likelihood of a regression model with the MLE coefficients ($-N/2\times(log(2\times\pi)+log(\sigma^{2})+1)$). I then subtracted the two terms to get the log of my Bayes factor.

But this assumes my samples are independent, when in reality they are serially autocorrelated. I guess that shouldn't bias my BF, but it should nonetheless polarize it. How can I overcome this other than thinning down my vector? I guess I should somehow correct my $N$?

• Please tell me if I am understanding you correctly. You are attempting to calculate a Bayesian estimator from a Pearson-Neyman parameter estimate and a Fisherian likelihood estimate, is that correct? Also, regardless of dependence, your formula is incorrect. Are you really thinking about the Bayesian Information Criterion and not the Bayes Factor? Finally, if your concern is model selection and autocorrelation in the sample space, then why are you not just constructing this as a Bayesian problem in the first place? – Dave Harris May 29 '17 at 6:16
• Hi, thanks! Since both models have the same number of parameters, comparing the MLEs of the two models is identical to computing the Bayes factor using the formula (\$exp(BIC_{0}-BIC_{1}/2)). I chose to use the MLE estimate instead of specifying a full Bayesian model just to save myself the trouble of finding appropriate priors for my parameters and estimating the evidence for each model. Also - can you point me to the error in my formula (this is what I obtained when I applied the likelihood formula to the BLUE)? Thanks again! – TanZor May 29 '17 at 6:33