Nurse staffing patterns and quality of care in nursing homes