/* tornado.sas */ /* */ /* analysis of C Anderson tornado data */ data a; infile 'tornado.dat'; /* umax = rate of anvil outflow */ /* mda = max deviation angle of anvil to ambient wind */ /* type = 0 (no tornado), 1 (weak), 2 (strong) */ /* sraw = storm relative ambient wind */ input umax mda type sraw ; /* create just 0/1 variable torn */ torn = (type > 0 ) ; /* do a simple classification, 2 groups, and list 'em all */ proc discrim data=a method=normal pool=yes list ; class torn ; var umax mda sraw ; run ; /* read in the south carolina data to classify */ data b; infile 'scarolin.dat'; input umax mda type sraw ; tron = (type > 0 ); run ; /* let's look at three groups, and get post probs */ /* standard (simplest) method common cov */ proc discrim data=a method=normal pool=yes testdata=b testlist ; /* new data classify each & give probs */ class torn ; * class variable in calibration ds ; testclass tron ; * class variable in test ds ; var umax mda sraw ; * variables to be used ; run ;