Could you give me the *specific* codes?
If they were P0171 and P0173 (I believe they are the ones, off the top of my head), it means "lean condition", and basically just indicates that more air is getting into the engine than what's measured by the MAF. At least on '98's, the main issure here would be the upper and lower intake gaskets. I can't remember if it was '00 or '01 that got a one-piece intake. If you got a separate upper and lower intake, then those gaskets could be the issue. However, it could be *any* vacuum leak.
A lean condition can also mean that it's having issues injecting the fuel, which can be bad injectors, clogged fuel filter, or a pump having issues.
O2 sensors and MAF sensor replacements assume that the computer is wrong in it's claims, but then you wouldn't have a horrible idle.
Disconnecting the EGR hose means that exhaust gas won't be routed back to the intake - this eases idle. (The entire idea of this is to help reduce emissions, and "lower the combustion temperature". Long story short, exhaust gas doesn't burn well.)
It also allows for another "leak", as it can suck air through the hose, without going through the MAF, meaning it won't "regulate down". This easing idle, could mean that you got a rich condition. If holding the tip of the EGR hose (to shut it off, and avoid the leak) means that it goes back to rough, it's the leaking vacuum that helps, and you may have a rich condition. If that doesn't change anything, what helps is exhaust gas not being rerouted. This could mean a lot of things, an example being high pressure on the exhaust manifold - something a clogged cat could result in. The high pressure would then force more exhaust back through the EGR valve, meaning more exhaust into the intake. Once again, there's a reason we use fresh air, and not exhaust gas, as our main intake.
Based on what you state (Rough idle, coughs at any load), I'd guess that some of the following could be true:
- Ignition and injection system
- - You changed the coil pack and plugs. The only thing left for ignition, would be wires, which I personally would have taken after plugs, if I speculated about ignition issues.
- - For injection, check the fuel filter, fuel pump pressure (Does it squirt fuel?), and injectors. Try giving it some injector cleaning additive. A big squirt of it.
- Leak
- - A vacuum leak is often followed by rough and high idle. If it's a gasket, it can be recognized by oil leaks (your engine consumes oil). If disconnecting the MAF results in more smooth (often in a bit higher as well) idle, this is often the case. In normal cases, disconnecting the MAF should case the idle to get rougher, or even die out completely.
- Sensors
- - The following sensors are related to the closed loop feedback system: Mass Air-flow sensor, Idle air temperature sensor (not the most important sensor), and O2 sensors. Mass air flow and idle air temperature sensors provide the main feedback about how much air goes into the engine, the O2/lamdba sensors are used to figure out how clean the engine burns, and can provide feedback about rich and lean conditions unnoticed by the system. All these sensors can be cleaned, using a swab, some lab alcohol (denaturalised alcohol, iso-propyl alcohol, whatever.), and a steady hand.
- Exhaust
- - The EGR valve being stuck can cause too much exhaust to be routed into the engine, causing it to choke up. This shouldn't be the case, as you replaced it.
- - Your cats could be clogged up. This is often noticed as a significant reduce in engine performance, as well as the ability to create white clouds behind you when you kick it.
- Intake
- - If it was only rough idle, your idle air control could've been stuck/defect. You could also have a leak in the vacuum control (a vacuum triggered swing-door style valve...thingie. It's the vacuum actuator on the top of the block, right behind the IAC)
Depending on whether you would say you're experiencing rich (generally rough driving, "choking" on higher loads, and no better idle when disconnecting the maf), or lean (better idle when maf disconnected, rough/swinging between suicidally low and extremely high idle), I'd go through different paths.
I'd check ignition, injection and check for clogs if I had a rich/coughing issue, and check the intake, look for leaks and check the idle air control systems if I had a suicidal idle/lean condition.
I hope this was helpful, and not just as confusing as I suspect it to have been.