Couple of things to do:
Change fuel filter, $10, it is in the frame rail under the drivers seat area.
Clean the MAF sensor, it is on the air cleaner housing, this sensor tells the computer how much air is coming into the engine, if this sensor gets a little buildup on it it will cause bogging and missing.
Google: clean ford ranger maf sensor
Also check the large air plenum(tube) that goes from the MAF sensor to the intake, this is a "ported" vacuum area, any leaks in this will cause similar symptoms because "unmetered" air is coming into the intake.
Make sure rubber gaskets at both ends are in good condition and no cracks on the under side of plenum.
After engine is warmed up, idle should be about 700-750rpms, with engine idling unplug the IAC(idle air control) Valve, it is on the upper intake.
The computer uses this valve to control the idle speed, when it is unplugged idle should drop down to 500rpms or so, or engine may even stall, this is good, it means you have no vacuum leaks in the intake.
If idle doesn't drop or starts to drift up and down then you have a vacuum leak, PCV Valve and hose would be the first place to check.