Updated function call that broke during renaming

Update call to `numcategories` to `ncategories`