Longitudinal study of cognitive and psychiatric functions in spinocerebellar ataxia types 1 and 2