Solved – Compare model fit for model trained on different data

goodness of fitrregression

I have two datasets, where I'm predicting y from x using a basic linear model for each dataset. Both models are significant, but have different results.

In dataset A, the model estimate for x is 1.5, but r-squared is only 0.2.
In dataset B, the model estimate for x is 0.6, but r-squared is 0.7.

Obviously, model for data B fits the data better according to its r-squared value. But I want to statistically quantify this goodness of fit (rather than just using the larger r-squared to pick the better model).

The datasets are different sizes and the models are not nested, so I can't compare them like I would if I were testing e.g. the null model against the full model. I'm not interested at all in the estimates, so combining the data into one dataset and testing the interaction doesn't give me what I'm looking for (at least I don't think it does).

What is the appropriate statistical test to test whether model B vs. model A better fits y in for its dataset?

Best Answer

What you are looking for is the goodness-of-fit measure of a statistical model. These measures summarize between the observed values and expected values (from the model). Depending on certain conditions, you could use the AIC, Bayesian Information Criterion, etc.

If you are looking for more than just goodness-of-fit measure, you could use methods involving the model mimicry. Model mimicry is a concept where one model tries to account for the data generated by the other model. The "better" fit model of the two normally accounts for its own data and to a certain extent accounts for the data generated by the competing model. (Note that, the two models should be competing models).

Look at this paper where Wagenmakers et al. describe model selection by quantifying the model mimicry. This intuitive procedure can be easily coded in R.

Hope it helps!

Related Question