Variables Sherine Shawky, MD, Dr.PH Assistant Professor Department of Community Medicine & Primary Health Care College of Medicine King Abdulaziz University Learning Objectives • Understand the concept of variable • Distinguish the types of variables • Recognize data processing methods Performance Objectives • Select the variables relevant to study • Perform appropriate data transformation • Present data appropriately Definition Of Variable “A variable is any quantity that varies. Any attribute, phenomenon or event that can have different values” Information Supplied By Variables Indices of Person Indices of Place Indices of Time Specification of Variable Clear precise standard definition Method of measurement Scale of measurement Role Of Variable Correlation Interdependent Interdependent Role Of Variable Association Independent Dependent Independent Confounding Dependent Independent Effect modifier Dependent Types of Variables Quantitative (continuous) Qualitative (Discrete) I- Quantitative Variables • Data in numerical quantities that can assume all possible values • Data on which mathematical operations are possible • Example: age, weight, temperature, haemoglobin level, RBCs count II- Qualitative Variables Qualitative variables are those having exact values that can fall into number of separate categories with no possible intermediate levels Nominal Ordinal 1- Nominal Variable Unordered qualitative categories Dichotomous (2 categories) Multichotomous (> 2 categories) 2- Ordinal Variable Ordered qualitative categories Score birth order Categorical social class Numerical discrete parity Continuous & Numerical Discrete Variables Continuous Variable -3 -2 -1 0 1 2 3 Numerical Discrete 0 1 2 3 Types of Variables - Quantitative - Dichotomous - Multichotomous - Score - Categorical - Numerical discrete How much? Who, How, where, when, What,…etc.? How many? Data Collection Tool Age in years: Gender: 1) male, 2) female Social class: 1) low, 2) middle, 3) high Height in cm: . Data Transformation Data Reduction Creation of composite variable Data Reduction Example • Data: Age from 47 individuals • Arrange in ascending order: 20, 21, 22, 23, 23, 24, 25, 29,29, 30, 30, 34, 34, 34, 34, 34, 34, 35, 35, 36, 37, 39, 39, 40, 43, 43, 43, 46, 46, 47, 47, 48, 48, 48, 50, 52, 56, 56, 58, 59, 59, 60, 62, 64, 64, 67, 69 Data Reduction Example (cont.) • Calculate the range: 69-20= 49 • No. of intervals= 5 • Width of class= 49/5 = 9.8 10 • Class intervals= 20-29, 30-39, 40-49, 50-59, 60-69 Data Reduction Continuous: 20, 21, 22…….69 Interval: 20-29, 30-39, 40-49, 50-59, 60-69 Ordinal: Twenties, Thirties, Forties, Fifties, Sixties Nominal: Young or Old Creation Of Composite Variable Single variables Quantitative Composite variable Quantitative Qualitative Qualitative Data Presentation Tabular Diagrammatic Data Presentation Variable Nominal Ordinal Interval Continuous Table - Frequency Percentage Frequency Percentage Cumulative frequency - Cumulative percentage - Frequency - Percentage - Cumulative frequency - Cumulative percentage - Mean, SD - Mean, 95 %CI Chart - Pie Column or Bar Pie Column or Bar Linear Ogive - Histogram - Frequency polygon - Ogive - Scatter - Box plot Frequency Table Family Planning None Pills IUDs Others Total Freq (no.) 98 65 22 15 200 % 49.0 32.5 11.0 7.5 100.0 Pie Chart Column Chart All categories Single Category % 40 100% 80% 60% 40% 20% 0% 30 32,5 20,5 20 10 0 City A City B None IUDs Pills Others City A City B Pill Users Bar Chart All categories Single Category City B City B City A City A 0% 20%40%60%80% 100 % None IUDs Pills Others 20,5 32,5 0 10 20 30 40 % Pill Users Frequency and Cumulative Frequency Table Breast cancer Stage I Freq (no.) 64 Stage II 32.0 Cum. Freq 64 Cum % 32.0 58 29.0 122 61.0 Stage III 43 21.5 165 82.5 Stage IV 35 17.5 200 100.0 200 100.0 200 100.0 Total % Linear Chart Percentage Ogive (Cumulative Percentage) Stages of Breast Cancer Frequency and Cumulative Frequency Table for Variable of Interval 20-29 Freq (no.) 9 30-39 % 19.1 Cum. Freq 9 Cum % 19.1 14 29.8 23 48.9 40-49 11 23.4 34 72.3 59-59 7 14.9 41 87.2 60-69 6 12.8 47 100.0 Total 47 100.0 47 100.0 Horizontal axis For Variable of Interval Class 20-29 30-39 40-49 50-59 60-69 Histogram Polygon Boundaries Boundaries Mid (1) (2) point Lower Upper Lower Upper 20 30 19.5 29.5 24.5 30 40 29.5 39.5 34.5 40 50 39.5 49.5 44.5 50 60 49.5 59.5 54.5 60 70 59.5 69.5 64.5 Histogram % % 35 30 25 20 15 10 5 0 35 30 25 20 15 10 5 0 20- 30- 40- 50- 6070 19.5- 29.5- 39.5- 49.5- 59.569.5 Frequency Polygon % 40 30 20 10 0 24,5 34,5 44,5 54,5 64,5 Tabular Presentation of Quantitative Data or Variable Total Mean SD Age (years) 47 95% CI 42.1 13.5 38.2-46.0 Scatter Diagram Weight in kgm 100 80 60 40 20 0 0 10 20 30 Age in years 40 50 AGE in years Box-whisker plot 80 70 60 50 40 30 20 10 Male Female 20 N = 27 SEX Conclusion The variable is the basic unit required to perform a research. The researcher has to select the list of variables relevant to the study objectives, specify every piece of information and assign its role. The type of variable should be set in order to allow for proper data collection, transformation and presentation.