# model comparison of non-nested mixed-effects regressions fit to datasets of unequal sample size

My aim is to compare the performance of non-nested but closely related mixed-effects regression models fit to two datasets of different sample size. The data was obtained from behavioral experiments using different tasks but analyzed for the role of the same predictors. At a first (qualitative) glance, the models seem to perform very well on one dataset and quite poorly on the second dataset. But because of the differences between the two datasets, I cannot tell for sure if the performance is really much different. I need to know the exact answer in order not to hand-waive my interpretation of the supposed differences.

I have researched the issue and have come up with a specific procedure for mixed-effect regression, since measures for assessing the performance of this kind of regression (or the estimation of such measures) differ somewhat from those typically used for fixed effects regression. I would like to get feedback from you whether this procedure is correct. I also have unresolved questions. I will cite all consulted books, articles, and Cross-validated posts used to come up with this procedure.

1. Before assessing performance I check whether the two sets are statistically independent (the use of different tasks in experiments in which the data was elicited provides one important reason for assuming independence, yet the fact that they are used to examine the same phenomenon might suggest they are not entirely independent). This is not a trivial question, since if the two sets are not independent, one needs to factor in the correlations at a later point when using tests to test for significant differences in performance, as argued in this post.

To test for independence, I use Chi-square because it does not assume equal variances between the two groups or homoskedasticity in the data (see McHugh 2013). Moreover, Chi-square does not require equal sample sizes, as argued in this post.

Now, let's assume that this test shows the two sets to be significantly different (my first question is how to assess performance of models if the test fails to show independence, see Question 1 below for details). This brings be to step 2.

1. In order to assess the performance of two datasets A and B relative to each other, we first need to ensure we are comparing datasets of the same size. This can be done by subsampling with replacement from the larger dataset the number of datapoints that corresponds to the size of the smaller dataset. The subsampling can be run, say, a 1000 times. This step is taken in its entirely from this post. Once I have obtained sets of equal sizes, I can compare the performance of mixed-effect models on these sets.

2. I sample with replacement from the two sets for a 1000 times and to each of the 1000 bootstrapped samples from the two datasets I fit a mixed-effects regression model (once again, note that there are slight differences in the fixed effects between the model used for the two respective datasets). From each model I record the AIC and then calculate the bootstrapped mean AIC and confidence intervals for the two datasets (Question 2). The reason I'm using AIC here is that it factors in differences in model complexity (e.g. different number of predictors), although I could also use Area under ROC curve instead. I then check if the mean AICs are different by means of another test (Question 3).

Is this procedure correct? Then I have three specific questions.

Question 1

If the Chi-square test fails to show independence at step 1, then this post proposes that I should only select the points that are independent. Assuming this is the way to proceed, how do I determine which specific points are not independent?

Question 2

In the post I adapted step 3 from, what is extracted from each model is the difference between the exact same model fit to a pairs of samples from two datasets. What I'm doing here is different, in that I am calculating two bootstrapped means and then test for the difference between them. Since my models are not exactly the same, I cannot extract differences directly. Is testing for the difference between mean AICs appropriate here?

Question 3

This question depends on the distribution of AIC values (or AUC values if one chooses that measure instead). What test is appropriate here? Can I use a parametric t-test here and assume that the two AIC sets have the same variances and are normally distributed?

I'd be grateful for any and all of your help. Even answering one of the questions will help me piece together the whole answer eventually.

Later edit, after more research and thought:

I think that the Chi-square for independence is not useful for me here, because it is used to establish whether there is a relation between two categorical variables applied to the same sample. I think I found a more appropriate test.