A direct calculation of the tunnelling current: IV. Electron-phonon interaction effects