Announcement

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

  • Compare categorical data between two time periods?


    Hi Statalist, I'd like to kindly ask for your help to find a Stata command to compare these categorical data (hospital visit and frequency) between year 1 and year 1 (e.g., hospital1 vs hospital2). Could you please suggest me proper Stistical model to find the effect and p-value? Thank you so much!
    Last edited by Insung Kang; 14 Jun 2022, 09:11.

  • #2
    Dataex fixed below:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float participant str3(hospital1 hospital2) str10(frequency1 frequency2)
     1 "yes" "yes" "always"     "always"    
     2 "yes" "yes" "always"     "always"    
     3 "no"  "yes" "never"      "sometimes" 
     4 "no"  "yes" "sometimes"  "frequently"
     5 "no"  "no"  "never"      "sometimes" 
     6 "no"  "no"  "always"     "always"    
     7 "no"  "no"  "frequently" "always"    
     8 "yes" "yes" "always"     "always"    
     9 "no"  "yes" "never"      "sometimes" 
    10 "no"  "no"  "sometimes"  "frequently"
    end

    Comment


    • #3
      Insung:
      how can it be that -id10- reports two -no- but is visited in bith hospitals notwithstanding?
      Does -frequency1- -frequency2- refer two outpatient visits?
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Originally posted by Carlo Lazzaro View Post
        Insung:
        how can it be that -id10- reports two -no- but is visited in bith hospitals notwithstanding?
        Does -frequency1- -frequency2- refer two outpatient visits?
        Thank you for asking Carlo,

        Var "hospital" and var "frequency" are independent. "frequency" is actually the frequency of bathroom fan use.

        Could you please further give me some advice on which statistical tests are proper?

        Comment


        • #5
          Insung:
          at a very first sight and assuming that you have many more predictors and controls to be used in your analysis, I would think about -ologit-.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Thank you so much!

            Comment

            Working...
            X