Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I compare different levels of a categorical variable?

    I am trying to do a study to see whether different groups of households are dissimilar or not regarding some behavior. To do this, I created four household groups from two information in my dataset: one set of information is households’ perception (binary - 0/1); and the other set of information is households actual result (binary - 0/1). Using the two information, I created a variable with 4 categories of households [i.e., category 1 => Perception = 0, actual result = 0 (0,0); category 2 => Perception = 1, actual result = 0 (1,0); category 3 => Perception = 0, actual result = 1 (0,1); and category 4 => Perception = 1, actual result =1 (1,1).]

    I am interested in testing the following hypothesis:
    • Households that belong to (0,0) and (1,1) are similar in terms of their averting behavior
    • Households that belong to (0,1) and (1,0) are similar in terms of their averting behavior
    • Households that belong to (0,1) and (1,0) are dissimilar from those that belong to (0,0) and (1,1) in terms of their averting behavior
    My dependent variable is the averting behavior (binary variable) and the main independent variable is the household group (4 categories as explained above). How would I go about testing my hypothesis?

    I tried to run a probit model and do a pairwise comparison test, but not sure if that is the correct approach:

    Code:
    probit averting_behavior household_group
    pwcompare household_group, effect post
    Can anyone please point me to the right direction on how I could test my hypothesis?

  • #2
    Almost. For -pwcompare- to work properly, the -probit- before it has to be written with factor-variable notation. As you have written it, Stata will assume that household_group is a continuous variable, and it will probably just throw an error message. In order for Stata to know that household_group is a categorical variable, you need to prefix it with i. in your -probit- regression. So:
    Code:
    probit averting_behavior i.household_group
    pwcompare household_group, effect post
    should do what you want.

    Comment

    Working...
    X