Automated signal analysis of slow-wave sleep in patients with dementia