100 likes | 217 Vues
This guide covers essential techniques for transforming and manipulating data, including recoding continuous data into symmetrical and asymmetrical bins, and performing operations on alphanumeric variables (string variables). Learn how to categorize data into specified intervals and work with various string functions, such as concatenation and substring extraction. Additionally, the document explores generating test data and taking random subsamples from finite populations, providing a comprehensive understanding of data preparation and analysis strategies.
E N D
Teaching Data to do Tricks • Recoding continuous data into bins • Operations on alphanumeric variables (string variables) • Generating test data • Taking random subsamples from a finite population
Recoding continuous data into bins Symmetrical bins If 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 bins If 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;
Operations on alphanumeric variables • Concatenation • Substr • Scan
Random samples • _n_ variable