Presentation is loading. Please wait.

Presentation is loading. Please wait.

CATEGORICAL VARIABLES Testing hypotheses using. When only one variable is being measured, we can display it. But we can’t answer why does this variable.

Similar presentations


Presentation on theme: "CATEGORICAL VARIABLES Testing hypotheses using. When only one variable is being measured, we can display it. But we can’t answer why does this variable."— Presentation transcript:

1 CATEGORICAL VARIABLES Testing hypotheses using

2 When only one variable is being measured, we can display it. But we can’t answer why does this variable change? Why does homicide go up and down? That, in effect, is the research question To find out why? we begin with a literature review and identify variables (we call them “independent” variables) whose change may cause change in our variable of interest (the “dependent” variable, say, homicides, or officer’s disposition). – In other words, its value or level “depends” on the value or level of these other variables We then state this formally, in a hypothesis: changes in IV  changes in DV To assess a relationship, we can place both variables on a table, and the case frequencies in cells But without more, all this can suggest is association - that certain values of these variables coincide – Uncooperative students are arrested a lot, and cooperative students are seldom arrested To find out whether cooperation  disposition, we must take it further… Assessing relationships between categorical variables Officer’s disposition

3 Independent variable: Income, measured categorically (nominal variable) – Two values: low income and high income – Income is measured by where a car is parked - student lot (low income) and faculty-staff lot (high income) Dependent variable: Car value, measured categorically (ordinal variable) – 1, 2, 3, 4 or 5 (1- cheapest, 5 - most expensive) Sampling – Stratified, disproportionate, systematic random sampling of 10 cars from a student lot, and 10 cars from a faculty lot Coding – Income is automatically coded by a car’s location (faculty-staff or student lot) – A 5-level categorical measure is used to code car values Hypothesis: Higher income persons drive more expensive cars

4 DV - Car value IV - Income12345n LOW (student lot)2203310 HIGH (F/S lot)3111410 Car value Student lot Car value Faculty/staff lot Team A For the purposes of this class, always place the values of the DV along the horizontal axis, and the values of the IV along the vertical axis Each value of the DV has its own column Each value of the IV has its own row Step 1: Coding Hypothesis: Higher income persons drive more expensive cars

5 DV - Car value IV - Income12345n LOW (student lot)6400010 HIGH (F/S lot)5122010 Team B Student lot Faculty/staff lot For the purposes of this class, always place the values of the DV along the horizontal axis, and the values of the IV along the vertical axis Each value of the DV has its own column Each value of the IV has its own row Step 1: Coding Hypothesis: Higher income persons drive more expensive cars

6 DV - Car value IV - Income12345% LOW (student lot)20% 0%30% 100% HIGH (F/S lot)30%10% 40%100% For accurate analysis, frequencies must be converted to percentages Convert each row separately so the cells add to 100 percent DV - Car value IV - Income12345% LOW (student lot)60%40%0% 100% HIGH (F/S lot)50%10%20% 0%100% Team A Team B DV - Car value IV - Income12345n LOW (student lot)2203310 HIGH (F/S lot)3111410 DV - Car value IV - Income12345n LOW (student lot)6400010 HIGH (F/S lot)5122010 Step 2: Percentaging

7 DV - Car value IV - Income12345% LOW (student lot)20% 0%30% 100% HIGH (F/S lot)30%10% 40%100% Switch values of the independent variable. Does the distribution of car values change? If so, is the difference in the predicted direction? DV - Car value IV - Income12345% LOW (student lot)60%40%0% 100% HIGH (F/S lot)50%10%20% 0%100% Team A Team B Step 3: Analysis Forty percent of the cars in the student lot are value 1 and 2. Same for the F/S lot. There are differences between rows in values 3-5, but they seem minimal. All the cars in the student lot are value 1 and 2. But forty percent of the cars in the F/S lot are value 3 and 4. As we “switch” values of the IV from low to high income, the proportion of expensive cars substantially increases. The direction of the effect is consistent with the hypothesis.

8 IV Poverty is measured by income, DV crime by arrests – Income has two values, low and high – Arrests has two values, never arrested and arrest record To test the hypothesis, switch from one category of the IV to the other. – Does the distribution of cases along the DV change substantially? – If so, is the change in the hypothesized direction? Another example Hypothesis: poverty  crime Never Arrested Arrest Record Low Income 80%20%100% High Income 20%80%100% Distribution flip-flops in an unexpected direction. High income persons seem much more likely to have an arrest record. The hypothesis is rejected. Distribution remains the same. There seems to be no connection between income and arrest record. The hypothesis is rejected. Never Arrested Arrest Record Low Income 50% 100% High Income 50% 100% Never Arrested Arrest Record Low Income 20%80%100% High Income 80%20%100% Distribution flip-flops in the expected direction. High income persons seem much less likely to have an arrest record. The hypothesis is confirmed.

9 Cranking it up a notch with “elaboration analysis” Hmmm, interesting! Sergeants are more stressed than patrol officers. But is it possible that another variable - one closely associated with position - either mediates the relationship with job stress or is the real driving force? In other words… Position on police force  other variable  job stress OR other variable  job stress position on police force Hypothesis: position on police force determines job stress Job Stress PositionLowHighn Sergeant306090 Patrol officer8624110 Source: Fitzgerald Job Stress PositionLowHigh Sergeant33%67%100% Patrol officer78%22%100%

10 Elaboration analysis - using first-order partial tables to analyze the effect of a “control” variable So…what variables might be associated with position and with job stress? – Data indicates that females are less likely to be police supervisors. – The literature review also suggests that males and females may have different stress responses Let’s “elaborate” (dig deeper) – Does the effect of position on job stress hold regardless of gender? Gender is used as a “control” variable. We will test the original, “zero-order” relationship between position and job stress, “controlling” for each value of gender. – Gender is categorical, so we keep using tables Create one table just like the one we originally designed (position  job stress) for each value of control variable gender – One table for males, another for females – Each table is identical to the zero-order table, except it only includes cops of that gender These tables are called “first order partial tables” because they represent our first attempt to introduce a “control” variable. – Each table is “partial” - only part of the sample - because it only includes cases with a certain value of the control variable

11 Original “zero-order” tables First order partial tables - one for each value of the control variable Job Stress PositionLowHighn Sergeant306090 Patrol officer8624110 Job Stress - 130 male officers PositionLowHighn Sergeant144660 Patrol officer581270 Job Stress - 70 female officers PositionLowHighn Sergeant161430 Patrol officer281240 Job Stress - 130 male officers PositionLowHigh Sergeant23%77%100% Patrol officer83%17%100% Job Stress - 70 female officers PositionLowHigh Sergeant53%47%100% Patrol officer70%30%100% Job Stress PositionLowHigh Sergeant33%67%100% Patrol officer78%22%100%

12 Zero-order table, all cops First-order partial table, male cops No, the percentages aren’t exactly the same. But, overall, the relationship in the first-order partial table is in the same direction as in the zero-order table, perhaps stronger. Most male sergeants report being highly stressed, and most male patrol officers report very low stress. Knowing that an officer is male is consistent with the hypothesis that higher position leads to more job stress. Does the zero-order relationship between position and job stress persist for males? Job Stress - Male officers PositionLowHigh Sergeant23%77%100% Patrol officer83%17%100% Job Stress PositionLowHigh Sergeant33%67%100% Patrol officer78%22%100%

13 OUTCOME: SPECIFICATION Knowing that officers were male didn’t change our opinion about the effects of position on job stress. So for male officers, the “zero-order” relationship between position and job stress holds. But knowing that officers were female gave us a new insight. Only 47% of female sergeants report being highly stressed, a far smaller proportion than 77% of male sergeants. So our opinion of the effects of position on job stress is moderated by one value of the control variable, female. Knowing that a supervisor is female tells us something we didn’t know. Does the zero-order relationship between position and job stress persist for females? Zero-order table, all cops Job Stress PositionLowHigh Sergeant33%67%100% Patrol officer78%22%100% Job Stress - Female officers PositionLowHigh Sergeant53%47%100% Patrol officer70%30%100% Job Stress - Male officers PositionLowHigh Sergeant23%77%100% Patrol officer83%17%100%

14 First-order partial analysis: three outcomes Doing a first-order partial analysis yields three possible interpretive outcomes: – Specification (prior example): The zero-order relationship persists for some but not all values of the new variable. Coding this variable teaches us something. – Replication (next example): The original relationship from the zero-order table persists at both values of the new variable. Coding for the new variable teaches us nothing. – Explanation (final example): The zero-order relationship is not present at any value of the new variable. The apparent effect of the original independent variable - the one in the hypothesis - has been completely “explained away.” We just covered specification. Let’s turn to the other two possible outcomes of elaboration analysis.

15 PRACTICAL EXERCISE Hypothesis: Higher rank  Less cynicism Sample of 100 officers and 100 supervisors ―Twenty officers scored low on cynicism; 80 were high cynicism ―Fifty supervisors scored low on cynicism; 50 were high cynicism Build a (zero-order) frequency table, then convert it to percentages Be sure to place the categories of the dependent variable in columns, and the categories of the independent variable in rows

16 Well, that was easy! Looks like the hypothesis (higher rank, less cynicism) is confirmed Of course, we can’t stop here. Many variables are floating around. Are there any that may be related to our main independent variable, rank, and which could possibly affect cynicism? Cynicism RankLowHighn Officers2080100 Supervisors50 100 200 Cynicism RankLowHighn Officers20%80%100% Supervisors50% 100% PRACTICAL EXERCISE Hypothesis: Higher rank  Less cynicism Zero-order tables

17 According to our literature review, a variable associated with rank – gender – may affect cynicism. Let’s “control” for gender. We get data on cynicism for officers and supervisors, broken down by gender: MALES Officers: 10 low cynicism, 50 high cynicism Supervisors: 35 low, 35 high FEMALES Officers: 10 low, 30 high Supervisors: 15 low, 15 high Create first-order partial tables for gender, convert tables to percentages, and analyze the results... PRACTICAL EXERCISE Hypothesis: Higher rank  Less cynicism

18 Original “zero-order” tables Cynicism RankLowHighn Officers2080100 Supervisors50 100 200 Cynicism RankLowHigh Officers20%80%100% Supervisors50% 100% Cynicism - Males RankLowHighn Officers105060 Supervisors35 70 130 Cynicism - Males RankLowHigh Officers17%83%100% Supervisors50% 100% Cynicism - Females RankLowHighn Officers103040 Supervisors15 30 70 Cynicism - Females RankLowHigh Officers25%75%100% Supervisors50% 100% OUTCOME: REPLICATION Each level of the control (“first order”) variable - male and female - yielded about the same findings as the zero- order table. Gender did not add anything to what we already knew about the relationship between rank and cynicism. In essence, we replicated the zero-order findings. In other words, gender is not a factor in rank  cynicism. Our original hypothesis remains confirmed. First-order partial tables

19 But the literature suggests that still another variable associated with rank – time on the job – may affect cynicism. Let’s “control” for time on the job. Here’s the data: LESS THAN FIVE YEARS ON THE JOB Officers: 0 low cynicism, 75 high cynicism Supervisors: 2 low cynicism, 40 high cynicism FIVE YEARS OR MORE ON THE JOB Officers: 20 low, 5 high Supervisors: 48 low, 10 high Create first-order partial tables for time on the job, convert tables to percentages, and analyze the results... PRACTICAL EXERCISE Hypothesis: Higher rank  Less cynicism

20 Original “zero-order” tables Cynicism RankLowHighn Officers2080100 Supervisors50 100 200 Cynicism RankLowHigh Officers20%80%100% Supervisors50% 100% Cynicism, <5 years RankLowHighn Officers075 Supervisors24042 117 Cynicism, 5+ years RankLowHighn Officers20525 Supervisors481058 83 Cynicism, <5 years RankLowHigh Officers0%100% Supervisors5%95%100% Cynicism, 5+ years RankLowHigh Officers80%20%100% Supervisors83%17%100% First-order partial tables OUTCOME: EXPLANATION Each level of control (“first order”) variable time on the job demonstrates a very strong relationship with cynicism. This completely “explains” (wipes away) what seemed to be a relationship between rank and cynicism. Our original hypothesis (rank  cynicism) must be rejected. Now we have a new hypothesis to test: time on the job  cynicism. Good luck!

21 Cynicism - Males RankLowHighn Officers105060 Supervisors35 70 130 But isn’t this too “loosey-goosey”? Assume there is a relationship between variables. When we “switch” the value of the IV, will the change in the DV always be this obvious? No. And when the DV has multiple categories, such as in our parking lot exercise, visually discerning an effect can be impossible. Bottom line - changes in percentage are not enough. Great. Now what? Fortunately, we can use the cell frequencies to calculate a statistic known as “Chi-square”, X 2. This statistic assigns a numerical measure to the relationship between variables. We then look up that number in a table to determine if it is large enough to be statistically “significant.” All we need is the original frequency table? We use the table to build a second table, which projects what the frequencies would be if there was NO relationship between variables. We then compare the two frequency tables. More on that during the third part of the semester! Cynicism - Males RankLowHigh Officers17%83%100% Supervisors50% 100%


Download ppt "CATEGORICAL VARIABLES Testing hypotheses using. When only one variable is being measured, we can display it. But we can’t answer why does this variable."

Similar presentations


Ads by Google