Announcement

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

  • comparing within the same sample

    Dear StataList Members,
    Would appreciate it if anyone might provide some suggestions about the following: I'm asked to check if the number of consults significantly differed between 2 types of services. Wonder if a chi-square goodness of fit test might be appropriate here (e.g., by setting the hypothesized proportions for the 2 groups equally, e.g., 50%)...?
    I searched inside Stata Help but not sure if I got the accurate command for that: I found " sem estat gof" but that is probably not the right one. Found some others that needed to be installed on my computer: "st0299 . . . . . . . . . . Goodness-of-fit tests for categorical data", " st0360/chi2gof.ado", etc.
    Any suggestions would be greatly appreciated. Thank you.
    Sincerely
    MN

  • #2
    You could use either of the following to carry out a chi-square goodness of fit test.

    Code:
    net describe tab_chi, from(http://fmwww.bc.edu/RePEc/bocode/t)
    net describe st0142, from(http://www.stata-journal.com/software/sj8-2)

    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 19.5 (Windows)

    Comment


    • #3
      Thank you very much, Mr. Weaver.

      Comment


      • #4
        Musarrat:
        have you considered -poisson-?
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thank you very much, Mr. Lazzaro, for taking the time to respond to my request. I really appreciate that. To answer your question: No, I'm not familiar with Poisson and don't know how to do that. Moreover, the analysis focus has been changed. Instead of the counts, the study team wants to compare the average number of consults per day between the 2 groups of hospitals. So I'm thinking about Mann Whitney test since the sample size is so small: 1 group has n=4 hospitals and the other group has n=7 hospitals. Am not sure, however, if this test is appropriate for such small sample size and unequal groups. Your expert opinion would be greatly appreciated. Thanks.

          Comment


          • #6
            Musarrat:
            you may also want to consider a bootstrap -ttest- with unequal variance (see -bootstrap- entry in Stata .pdf manual).
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Thank you, Mr. Lazzaro. I'm not familiar with that but am interested to learn, so will try to find the resource you mentioned. Thank you.
              On another note, if I might ask something again: this is another question for which I thought about doing a Chi-squared test of independence to check if the hospitals differed in their culture of requesting consults. The 2 variables are nominal ; each variable has several categories, resulting in a 9X11 contingency table. Total N= approximately 2800. One of the cells has an observed count of 0. Is that a problem if I want to do a Chi-Squared test?
              (I ran the test in Stata to check if any of the expected frequencies was <1 and if >20% of the cells had an expected frequency<5; these problems were not there, so I felt Fisher's exact test was not needed... in addition, no marginals were zeros.). Thank you very much!

              Comment

              Working...
              X