A semiparametric method for estimating the progression of cognitive decline in dementia