A study of longitudinal data examining concomitance of pain and cognition in an elderly long-term care population