In NY they look at a variety of factors to establish state of residency. In addition to the normal things they look for (time spent out of state, DL, voter registration, location of medical providers, banks, etc.) they also explore the old adage "home is where the heart is" to determine where items of personal significance were located, such as photo albums and other family keepsakes.