engine idle very rough stops running at times, check engine light comes and goes on 1991 Lincoln Town Car

I have replaced air filter.

Asked by for the 1991 Lincoln Town Car
scan codes and post so we can adv
1 more answer
I had this same problem and had codes run on the car. Codes said I had bad EGR. Had this fixed. Had PCV valve replaced. Problem did not go away. Ran codes again and EGR code gone, but said misfire in cylinder #4. Was advised to replace spark plugs and wires. If this does not work then replace coil. Have not gotten that far yet. I think my car likes to play tricks on me. :-)