2000 Nissan Altima GXE stalls out randomly

I own a 2000 nissan altima GXE, and recently i have had a lot of problems, it would stall out randomly and OBD2 scanners said knock senor, EGR, and thermostat. I changed the knock sensor, cleaned the EGR valve and the EGR valve gasket, and haven’t touched the thermostat. I changed other things like the crankshaft sensor, fuel filter, fuel pump is fine, alternator, valve cover gasket, and spark plugs. It started stalling all the time after I changed the rotor in the distributor cap, it stalled before but less than after we changed the rotor. the car would stall randomly when the RPMs would go below 1000. I took it to my friends dad who is a mechanic and he was the one who changed the PCV valve and the EGR valve gasket and cleaned the EGR, he also cleaned the intake and changed the knock sensor. The SES light finally went away but the car would stutter when i would be stopped with the A/C on and i go to press on the gas. once the RPM hit 1000 it would stutter. It didn’t stall until a week and a half later. I was told it could MAYBE be throttle position sensor, computer, thermostat, oil loss from valve cover gasket, and idle speed control. What i want to know it could be and why, if anybody has any information please comment here. my name is Ricky.

Use the edit feature to remove your name and phone number. Putting that on an open web site is beyond dumb. The replies will be here on your thread.

You’ve got a lot of unknowns there OP, but you do seem to have one objective bit which might be a clue, the relationship of symptom to the ignition rotor replacement. If I had this problem, the first thing I’d do is ask my shop to replace the distributor cap, rotor (again), and spark plug wires. I presume your engine doesn’t have the coil-on-plugs configuration, right?

Edit: The cap and rotor work as a unit, and the mating surfaces wear together. That’s why it is important to replace both, not one or the other.

Another clue I’d focus on is the thermostat code. Modern engines have to run in a fairly narrow temperature range to run well. Do you have a dash coolant temp gauge? What is it saying? A thermostat code could mean the thermostat is no good (which is a pretty common thing on cars of this vintage), or it could mean the coolant temp sensor isn’t working correctly, a less common thing, but still possible. If the thermostat isn’t working, that’s important to address as an over-heating condition could happen and damage the engine. So ask your shop to at least test the thermostat function.

Does the engine seem to work ok at other than near-idle condition? No hesitation during acceleration from 30-60 mph?

Dirty iac. http://www.youtube.com/watch?v=2wz70IEr2I0