I am a graduate student with a question about credit for work that I did. I contributed design, data collection, analysis and writing for a paper for which I am almost certainly not being credited as an author. Though I have tried, I have not and am not expecting to make headway with the PI and first author to address issues clearly and fairly. I am also pretty certain the PI would find a way to retaliate if I push this issue with others. I am not sure if it is better to just give up and graduate or continue to push because I think I am right and I have put a lot of effort into this project. Would you please offer advice?
Any significant words that you wrote which go uncredited constitute plagiarism, full stop. Your contribution may not rise to the level of authorship, but it deserves an acknowledgement at the very least. The editor of the journal where the article is submitted should be quite interested in this at the very least. If you have draft text saved that can demonstrate your contribution to the paper, that may be strong and convincing evidence. Git/SVN commits to a LaTeX version of the paper would be best, but any evidence of work in progress is good. Contacting the editor is the nuclear option, but if you feel strongly and have proof, you may be able to make a case for killing the article.
The real question for me is whether the PI is your PhD supervisor or not. Your graduation hinges on your relationship with your PI, and if you destroy that relationship by exposing their misconduct, you may do more harm to yourself than the publication is worth. What does your supervisor say? Are they the same person?
I cannot understand why a professor would exclude any contributor who appears to have done as much as you have from authorship for any reason. Are we missing something here? What argument does this PI make that you shouldn't be included?