Transfer of calibration function in near-infrared spectroscopy