/* Create the dataset for the diagnostic examples */ clear input byte obs byte x y 1 1 6.2814 2 2 5.1908 3 3 8.6543 4 4 14.3411 5 5 13.8374 6 6 11.1229 7 7 16.5987 8 8 19.1997 9 9 20.0782 10 10 19.7193 end generate y1=y generate y2=y replace y1=y[ 5]+10 in 5 /* Create an outlier */ replace y2=y[10]+10 in 10 /* Create an outlier */ label variable obs "Observation" label variable x "X (original)" label variable y "Y (original)" label variable y1 "Y (scenario #1)" label variable y2 "Y (scenario #2)" desc list