A Chernoff Face Diagram in Stata

Chernoff faces are a visual way of comparing different variables or different categories within a variable. The different elements of each face (like the eyes, hair, nose, etc.) will change depending on different values assiociated with the different variables or categories.

To create a Chernoff faces diagram in Stata, you first need to download the chernoff command from the Stata Journal Volume 9 Issue 3. To do this, you use the following commands in Stata:

net from http://www.stata-journal.com/software/sj9-3
net install gr0038

To generate this graph in Stata, use the following commands:

sysuse auto, clear
drop if missing(rep78)
keep in 41/55
generate s = 1+runiform()
chernoff, isize(rep78,. 6) hdark(mpg) hslant(mpg) fline(weight) bvert(\_null\_) inote(make) iscale(s)