My experience corroborates with the conclusions of "Jdoggsc" and "electron" about degraded solder joints posts #25 and #32 above.
Speedometer on my ’98 Frontier 4WD had started malfunctioning. It was showing much lower speed at low velocities (eg. showed 15mph when doing 30mph) and then it was showing higher speed at highway velocities (eg. showed 75mph when doing 60mph). Only the speedometer was malfunctioning, all other gauges, tachometer, temperature, fuel level seemed ok. I noticed that when I banged my fist on the dashboard, the speedometer would go to the correct speed, sometimes staying at the correct speed for a minute or so before malfunctioning again. That pointed more to a local instrument panel issue rather than a malfunction on the distant velocity sending unit at the transmission. So I decided not to test the VSS, and to take out the instrument panel as suggested in this thread.
In my first attempt to fix the problem I first cleaned the speedometer connector contacts and also re-soldered the contacts in the back only, as shown in this thread:
http://www.nissanforums.com/frontier/111338-98-frontier-speedometer-troubles-2.html
See post by #21 by iamedelmann mentioned in post #21
But that did not do it for me. The speedometer was malfunctioning in exactly the same way.
So then I made a second attempt (had to take the instrument panel apart again) and went ahead and re-soldered almost all the contacts on the board, including the 4 contacts that Jdoggsc has circled in red in the third photo. See post #25 by Jdoggsc 3rd photo in this thread.
Unlike Jdoggsc, I did not de-solder the 4 contacts to separate the speedometer from its circuit. I just re-soldered the contacts in place. I could not de-solder them because I did not have a solder vacuum. So I just heated up almost all the connections with a soldering iron and added a little bit of fresh solder. The solder paste in the new solder typically helps reestablish a healthy connection. But be careful not to put too much new solder or you end up shorting contacts together, which will definitively make things worse. If you do pour too much solder and contacts join, as happened to me a couple of times, just shake off all solder from the soldering iron, re-melt and try to remove some solder until things look ok (I used a traditional soldering iron, things may be easier with a more sophisticated soldering iron). I did NOT re-solder the IC connections because they were too small and too cramped together to redo with a big soldering iron.
Oh yes, I also re-soldered the few connections on the bigger flexible printed circuit that is in the back of the whole instrument panel. See
http://www.nissanforums.com/frontier/111338-98-frontier-speedometer-troubles-2.html
See post by #21 by iamedelmann photos 1 and 2
In any case, these re-solderings fixed the problem for me. For now. We have to see if it lasts. I’ll post the results in a few days.
Regardless of the final outcome thanks to all the posters who took the time to create these threads and give me some ideas. I would have not attempted fixing this without reading these threads.
BTW, to take the instrument panel out on ‘98 Frontier you can watch this video:
https://www.youtube.com/watch?v=J-NZFo-4Gk8
It’s easy, just take out the outer grey panel (two screws at the bottom, one by the fuse box, another by the handbreak handle) plus two clips at the top (hard to get it past the handbrake lever but doable). Then take out the inner black panel around the instruments (4 screws) and then 4 screws hold the instrument panel. You pull the instrument panel half way out, at which point you have to disconnect the three connectors in the back before you pull out the panel any further (wires are short)
One final note: To resolder the connections on the small solid printed circuit on the back of the speedometer, you have to take the speedometer out of the instrument panel. To do that, you have to disconnect the flexible printed circuit connector from the speedometer (this small connector is inside the instrument panel, NOT the three connectors in the back of the panel). I found that to be a little tricky. You can pull the plastic black connector out a bit, but then I had to insert a very small screwdriver on the sides of the connector to lift the tabs and completely separate it. It is equally tricky to put it back together. These types of connectors seem to simply pinch the connections on the flexible printed circuit board to make contact. Holding the wire in and at the same time closing the connector seemed tricky, but with some practice, I think, eventually you get it done.