Cognitive changes predict functional decline in ALS