Residency for tax purposes requires: (1) an abode/domicile (i.e., place of residence), and (2) the objective intent to reside therein.
The fact that your drivers license and voter registration continues to be in NY could be argued to be proof of your intent to reside in NY. However, the fact that you actually resided elsewhere could be used to rebut that proof, were the matter disputed by a state tax authority.
You need some other proof that your residency is intended to be temporary (e.g., you are a full-time student in NJ or PA during the portion of the year during which you lived outside of NY) -- or, you risk being treated as a resident, since your time in each state jurisdiction was objectively more than merely transitory.
Hope this helps.
NOTICE: My goal here is to educate the public about the law. Please help me in this effort by clicking Accept for my Answer to your Question.
And, if you need to contact me again, please put my user id on the title line of your question (“To Socrateaser”), and the system will send me an alert. Thanks!