We present a schema-based model of a classic neuropsychological task, the Wisconsin Card Sorting Task (WCST), where competition between motor and cognitive schemas is resolved using a variation of a neuroanatomically detailed model of the basal ganglia. The model achieves a good fit with existing data at the group level and correctly identifies two distinct cognitive mechanisms held to underlie two distinct types of error. However, the correlations amongst other error types produced by the model differ from those observed in the human data. To address this, we cluster participant performance into distinct groups and show, by fitting each group separately, how the model can account for the empirically observed correlations between error types. Methodologically, this demonstrates the importance of modelling participant performance at the sub-group level, rather than modelling group performance. We also discuss implications of the model for the WCST performance of elderly participants and Parkinson’s patients.