I submitted a paper to a journal, and the decision was "accept with minor revisions." As I was addressing the reviewer questions to submit a final copy, I realized that I may have misrepresented the data.
Specifically, I may have over-reached with a statistical model. The model involved repeated measures of individuals who were initially one group (let's call it condition A), but were later split into two groups (B and C). The model gives me differences between conditions. My mistake was to calculate the actual values at each condition based on these differences, which was wrong because by dumb luck the 2 groups had a systematic offset at A before they were split (even though the members of each group were chosen randomly). Hopefully that explanation makes some sense. I presented the data in terms of "actual" values rather than differences because I thought this would be more informative for the reader. So, basically, all the numbers are wrong. It's a stupid mistake in hindsight, since I could find this information in the raw data.
The conclusions of the paper and the statistically significant relationships would still be the same in the corrected version, because I believe the model to be the correct one. However, almost all of the numbers, tables, and figures would need modification. And of course the strange systematic offset between randomized groups will raise eyebrows.
I'm certainly going to notify the editor and attempt to submit a corrected version of the paper. I'm wondering what I should expect to happen, though. Are journals understanding of this type of error, or does it represent something so egregious that the paper would be rejected and my credibility would be damaged? Or would it simply be reviewed again? I understand that it's largely up to the editor to decide, but I'm wondering if anyone with similar experience might give me an idea of what I'm dealing with. Thanks!