I guess I would look at why your sister moved in with you. Was there a divorce or break-up with the five year olds father? There must have been a significant reason for the move. Look at the reason and you probably have the answer to "why". Children react to things they have no control over by taking charge of what they can control.. like where to relieve yourself. Have the little girl checked out by a pediatrition. He will probably recommend a good counselor who can give you behavior modification techniques to use.
In the mean time you might try giving her little things to make choices about. Tell her that big girls who use the potty get to choose what to have for lunch or which playground to go to or what stories to read. (just examples). Try not to give a huge reaction when she does pee or poop on the floor (easy to say, huh?). When you do it just feeds into her feeling of controling the situation. Clean it up and reinforce how you wish she had gone in the potty so she could have chosen "what book to read ",but maybe she will next time so she can choose what "snack to have" etc... giving her a little power in simple things and downplaying the negitive might help.