My nissan altima has failed the nox part of the emssions test (limit 2.50 - mine 3.21) I've changed the bpt valve, vacuum solenoid controller and oxygen sensor. The car runs great - no codes - whole exhaust system two years old.
If you failed the nox you may just be running lean. Check for change your oil, check for vaccum leaks; especially around the EGR, which is usually the problem. Also change your spark plugs and wires to be safe. If none of that works you may have to retard your timing a little bit and some people even like to dump in a bottle of octane booster before the test, which does often work to lower the nox reading, but not always