"Residency" is a combination of facts and feelings.
What makes you a resident of a state (or country)?
Generally, you're a resident of a state
(or country) if you intend to either stay there permanently,
or return there after a temporary absence. It's where home is – where
you come back to after being away on vacation, business trip, overseas or
out-of-state employment, or school. Many factors are considered, not
the least of which are where you are registered to vote, own homestead property
and are licensed to drive.
Residency rules vary from state to state. For example, if
you spend more than a certain number of days in some states, you're considered
a resident whether it makes sense to you or not. If you have any concerns,
check with your State Department
of Revenue for specific residency rules,
especially as they apply to your particular situation.