If you are an alien (not a U.S. citizen), you are considered a non-resident alien unless you meet one of two tests: the (a) green card test or (b) the substantial presence test for the calendar year (January 1 – December 31). If you do not meet either the Green Card Test or the Substantial Presence Test, then you are a non-resident alien.
Green Card Test: You are a Lawful Permanent Resident of the U.S. at any time if you have been given the privilege, according to the immigration laws, of residing permanently in the U.S. as an immigrant. You generally have this status if the U.S. Citizenship and Immigration Service (USCIS) issued you an alien registration card, Form I-551, also known as a “green card.” You continue to have resident status under this test unless you voluntarily renounce and abandon this status in writing to the USCIS, your immigrant status is administratively terminated by the USCIS, or your immigrant status is judicially terminated by a U.S. federal court.