Several years ago, I did a summer project as an undergrad with a PI not at my undergrad institution (I'm in grad school now). Now, the project is finished and he wants to publish it with data that I've gathered.
The problem is, after checking my data, that the spreadsheets that I used to calculate the data are very inaccurate, to say the least. I can't remember exactly what I did, but there do seem to be some egregious inaccuracies (as in, values from the wrong dataset) in my spreadsheet compared to the raw data from the instrument either that I was colossally bad at copying data over correctly (all of the data in my spreadsheet do appear in the raw data someplace, but not necessarily in the right location, the right dataset, etc.), or worse, I'm terrified that I may have done it deliberately at the time. (How would someone be able to tell?) I did analysis with the faulty data back then and produced graphs.
Obviously, I will have to supply the correct data analysis before it gets published. But is it ok to explain it as "I majorly screwed up the analysis and made a lot of data entry errors, here's the corrected version"? I'm hoping that my PI will just use my corrected data and analysis and just focus on that instead trying to pore over my wrong spreadsheets to individually compare all the changes, many of which are embarrassing at best and look suspicious at worst. I am not under any suspicion of wrongdoing thus far.
I redid my data analysis with correct data entry and the results look messier on most of the things I messed up, though they do not affect the underlying trends. Not sure what this means - how likely is it for honest error to have the effect of making data look cleaner than it actually is? Also, my god, I was awful - mishmashing data from one trial with another, copying data from the wrong wavelengths and/or from the wrong trial, wrong normalization numbers, etc. etc. etc.
If you were a professor and you were approached by a student who says that made egregious errors on past data analysis and the corrected data looks not nearly as good, what would you think? Would you think they were honestly trying to fix a mistake, or trying to save face and cover for past misconduct?