You are a Michigan resident for tax purposes if:
Your permanent home (your legal address) was in Michigan for the entire year.
This is true even if you spent a lengthy amount of time out of state (ie: vacation or business trip). As long as you maintained a permanent home in Michigan that you returned back to, you are a full-year Michigan resident for tax purposes.