The biggest issue in this MU isn't actually Roy's speed, but rather his disjoints and raw power - you're quite susceptible to edgeguards and just straight-up being knocked out too far as Doc, but on the other hand, so is Roy (Arguably, moreso than you.), and the one thing you have undoubtedly better than him is your combos (-and projectile!).
You just kind of have to space him out and force and opening, then capitalise on it. Play patiently, keep your distance, and remember to always contest him offstage (mostly, try to steal his jump), even if it's just with pills. His offstage is pretty damn poor, including his recovery, so don't be too afraid to get out there, just be prepared incase things go wrong (His Up-B has super armour for example, so try not to contest him when you think the move will start.).
It should also be noted that a few of your moves can beat out some of his more irritating strings. Use N-air (Frame 3), U-air (Frame 4, can start combos if used well!) or even Up-B (Frame 3, can kill, notorious combo breaker, just be careful not to whiff and get punished.) if you need to to break out of poor situations.
You also have a semi-spike Smash attack at your disposal (D-Smash) which is especially strong against characters with poor recoveries like Roy. Make the most of this advantage in particular.
As a final MU specific note: Roy's Counter can be a pain in the ass, so if they start getting it often, chances are, you can condition them and bait it out and beat it with grabs, or just delayed attacks in general. -infact, this would be a perfect time to use D-smash since a baited counter gives you a little time to charge up your punish!
Also, while this is something I do in most MUs, I feel it's good to note anyway - short-hop B-airs are really good at spacing and will often contest and pressure your opponent since they auto-cancel. You can even mix-up a B-reversed Pill if they're taking their sweet time approaching or staying just out of range patiently, or if you just want a more direct pressure method since a pill is more likely to reach them. Overall, Doc arguably fights better up close when you know how to make the use of his tools when you have your back turned (Like the longer backwards range of U-smash.). So keep that in mind, and keep on your toes!
Those are the only tips I really have, but I hope they help!