Duration and frequency of migraines affect cognitive function: evidence from neuropsychological tests and event-related potentials | Synapse