My situation: I was a student on an F-1 visa in the U.S. during the first half of 2017. I received a salary while being a student. I had been in the U.S. for >5 years, so I was a resident alien for tax purposes. In early July, I had graduated and left the U.S. I received no U.S. income after leaving.
My question: Am I free to choose whether or not to file as a resident for the full year, or do I have to file as dual status? This link https://www.irs.gov/publications/p519#en_US_2016_publink1000222182 makes it sound like my residency is terminated on Dec 31 as a default, and I have to provide a statement to have the residency terminated earlier and file as dual status.
If it is true that I can choose, a follow-up question would be: What choice is most beneficial? Assuming I had income from another country during the rest of 2017, I assume it would be better to file dual status, since otherwise I might get taxed on that additional income. Assuming I had no income at all during the rest of 2017, it seems filing as a resident for the full year is best, since then I think I'm allowed more deductions. Is this correct?