Determination of pain intensity in newborns by Time Series Analysis