Is Missouri a second home or a temporary absence? Did you maintain your home in Illinois?
If you maintained your home in IL and MO is either a second home or was just a temporary residence, then you would your resident state as IL.
If you lived in MO and earned money in IL or vice versa, you would need to file a Part year resident return for MO (or non resident if you never set up a home there) as these states do not have reciprocal agreements.