Announcement

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

  • Comparing groups in the same variable

    I have a variables var1 var2 var3 etc. some of this variables are continuos and other dichotomous. For each of this variables there are three groups depending on another variable (region). My question is: how to see if there is statistical difference between this 3 groups for the same variable?

    Do I have to create another variables depending on the region?
    For continous I have to use anova, manova and bonferroni?
    For dicotomics chi square?

    Thanks for your help!


    Verónica.

  • #2
    If I understand your question correctly, for the continuous variables (say, var1), I would do something like:

    Code:
    tabstat var1, by(region) statistics(N mean SD)
    regress var1 i.region
    For your dichotomous variables (say, var2), something like:
    Code:
    tab var2 region, col chi2
    Note: For this one if you have some very small cells in the table, you might want to do Fisher exact instead of chi2.

    Comment


    • #3
      Thanks!

      In the model with regress the data obtained is taking the smallest category as a base?

      Now I have a p value in the probe with chi2, how do I know which of the three groups is the diferent?

      Verónica.

      Comment


      • #4
        In the -regress- output, yes, category 1 is the base category, and the output for categories 2 and 3 represent differences between those categories and category 1. If you want to specifically contrast regions 2 and 3, you can run
        Code:
        test 2.region = 3.region
        Another way, that gets all of the possible contrasts of each region with every other is, after -regress-, to run:
        Code:
        margins region, pwcompare
        See the help for margins about additional options if you want to adjust for multiple testing.

        With regard to the cross-tabulation and chi square test, the p-value is a test of the hypothesis that the probability of Dicotomica = Si is the same in all three regions. It does not provide information about which region might be different from the other two, or whether all three might be different. To go that route, I would do this:
        Code:
        logit Dicotomica i.region
        margins region, pwcompare
        For future reference, please don't post screen shot images to show output. They were just barely readable on my setup; most screen shots are not readable at all. To assure that the posted output is readable, copy and paste directly from the Results window (or your log file) into a code block on the Forum. If you don't know how to create a code block on the Forum, please see the FAQ for instructions. Thanks.

        Comment


        • #5
          Thanks really helpul, and It wouldn't be happen again.

          Best,

          Verónica.
          Last edited by Veronica Guzman; 06 May 2015, 13:38.

          Comment

          Working...
          X