New version page

# MSU FW 893 - Lecture 11

Pages: 10
Documents in this Course

9 pages

25 pages

18 pages

7 pages

14 pages

14 pages

## This preview shows page 1-2-3 out of 10 pages.

View Full Document
Do you want full access? Go Premium and unlock all 10 pages.
Do you want full access? Go Premium and unlock all 10 pages.
Do you want full access? Go Premium and unlock all 10 pages.

Unformatted text preview:

Teaching Data to do TricksRecoding continuous data into binsSlide 3Slide 4Slide 5Slide 6Slide 7Slide 8Operations on alphanumeric variablesRandom samplesTeaching Data to do Tricks•Recoding continuous data into bins•Operations on alphanumeric variables (string variables)•Generating test data•Taking random subsamples from a finite populationRecoding continuous data into binsNumber (X)1234567891011121314Recoding continuous data into binsNumber (X)1234567891011121314 Symmetrical binsIf X >=0 and X<5 then bin=2;if X >=5 and X<10 then bin=7;if X >=10 and X<15 then bin=12;if X >=15 and X<20 then bin=17;if X >=20 and X<25 then bin=22;if X >=25 and X<30 then bin=27; Asymmetrical binsIf X >=0 and X<10 then bin=1;if X >=10 and X<100 then bin=2;if X >=100 and X<1000 then bin=3;if X >=1000 then bin=4;Recoding continuous data into binsNumber (X) X/51 0.22 0.43 0.64 0.85 1.06 1.27 1.48 1.69 1.810 2.011 2.212 2.413 2.614 2.8Recoding continuous data into binsNumber (X) X/5 Int(X/5)1 0.2 02 0.4 03 0.6 04 0.8 05 1.0 16 1.2 17 1.4 18 1.6 19 1.8 110 2.0 211 2.2 212 2.4 213 2.6 214 2.8 2Recoding continuous data into binsNumber (X) X/5 Int(X/5) Int(X/5)*51 0.2 0 02 0.4 0 03 0.6 0 04 0.8 0 05 1.0 1 56 1.2 1 57 1.4 1 58 1.6 1 59 1.8 1 510 2.0 2 1011 2.2 2 1012 2.4 2 1013 2.6 2 1014 2.8 2 10Recoding continuous data into binsNumber (X) X/5 Int(X/5) Int(X/5)*5 Int(X/5)*5+21 0.2 0 0 22 0.4 0 0 23 0.6 0 0 24 0.8 0 0 25 1.0 1 5 76 1.2 1 5 77 1.4 1 5 78 1.6 1 5 79 1.8 1 5 710 2.0 2 10 1211 2.2 2 10 1212 2.4 2 10 1213 2.6 2 10 1214 2.8 2 10 12Recoding continuous data into binsNumber (X) (X+2)/5 Int((X+2)/5) Int((X+2)/5)*51 0.6 0 02 0.8 0 03 1.0 1 54 1.2 1 55 1.4 1 56 1.6 1 57 1.8 1 58 2.0 2 109 2.2 2 1010 2.4 2 1011 2.6 2 1012 2.8 2 1013 3.0 3 1514 3.2 3 15Operations on alphanumeric variables•Concatenation•Substr•ScanRandom samples•_n_

View Full Document