In most states, you are considered a resident after you've lived there for six months. However, you have to be gone from your old state for 18 months to be considered a nonresident.