Statistical Aspects of Near-Infrared Spectroscopy for the Characterization of Errors and Model Building