must have been doing (guessing about the past) (B2 Grammar)

You use these guesses when you don't know for sure — so the modal you pick shows how sure you are. Read it as a scale of certainty: - must have been — you're sure it's true (the evidence really only points one way). - might / could / may have been — it's just possible, one option among several. You're guessing. - can't have been — you're sure it's NOT true (the evidence rules it out). Same evidence can give different guesses — choose the modal that matches your confidence. The same scale works for a guess about right now (must be / might be / can't be) and about the past (must have been / might have been / can't have been). Register: may is a bit more formal than might or could; the three mean the same here.

How sure are you? must → might/could/may → can't

must / might + have been + the -ing form

To guess about something that was going on at a past moment, use a modal + have been + the -ing form. It puts the spotlight on an action in progress, not a finished one.

Don't drop the have

The full shape is modal + have + been + -ing. The little have is easy to lose in speech, but it has to be there.

can't have been + -ing (ruling it out)

At the 'sure it's NOT true' end of the scale, when the evidence makes a past action impossible, use can't have been + the -ing form. Keep the have here too — can't have been, never "can't been".