Source: https://webpages.uidaho.edu/CALS-StatProg/sas/workshops/catmod/handout1_cat.pdf