Announcement

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

  • #16
    Hi Natallia. First, I still do not understand why your mathematical colleague is advising use of McNemar's Chi-square when your primary interest appears to be in whether or not there is a treatment effect. (I assume the z-test for comparing the two McNemar Chi-squares is the square root of a Pearson Chi-square on a 2x2 table where the row variable is Treatment, and the column variable is direction of change, positive or negative.)

    Second, I think this is now getting beyond the point were I (or anyone else) can be very helpful through the continued exchange of posts in a discussion forum. I think you to find someone local with appropriate expertise. I see there is a Unit of Epidemiology and Biostatistics at one of the universities in your city. Perhaps someone there would be able to advise you.

    HTH.
    --
    Bruce Weaver
    Email: [email protected]
    Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
    Version: Stata/MP 18.0 (Windows)

    Comment


    • #17
      That what I get:
      tabulate ib1.r_treat ib2.PersonWithn_PPI1 if !missing(PersonWithn_PPI3)
      factor-variable and time-series operators not allowed
      r(101);
      [CODE]
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input int id byte r_treat float(PersonWithn_PPI1 PersonWithn_PPI3)
      9 1 1 1
      11 2 1 1
      12 1 1 1
      17 1 0 0
      20 2 1 1
      39 2 0 0
      53 2 0 0
      54 2 0 0
      55 1 0 0
      56 2 0 0
      57 1 0 0
      59 1 0 0
      end

      May be I making mess in preprocessing/data management? I started with a "long dataset" where every medication is coded by a line, then defined if persons gets PPI will get 1 in the new variable PersonWithn_PPI1) Would it helps if I show you an example of the original dataset?

      Sincerely, Natallia

      Comment


      • #18
        Not sure If I posted the dataset correctly:-)
        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input int id byte r_treat float(PersonWithn_PPI1 PersonWithn_PPI3)
          9 1 1 1
         11 2 1 1
         12 1 1 1
         17 1 0 0
         20 2 1 1
         39 2 0 0
         53 2 0 0
         54 2 0 0
         55 1 0 0
         56 2 0 0
         57 1 0 0
         59 1 0 0
         65 2 1 1
         68 2 1 1
         69 2 1 0
         74 1 0 0
         79 1 1 0
         82 1 0 0
         93 2 0 0
         97 1 0 0
        101 1 1 1
        104 2 0 0
        105 2 0 0
        117 2 0 0
        121 2 1 1
        122 1 0 0
        136 1 0 0
        146 1 0 0
        147 2 0 0
        153 1 0 0
        154 2 0 0
        165 1 0 0
        166 1 0 0
        167 1 1 1
        170 1 0 0
        172 1 0 0
        173 1 0 0
        177 2 0 1
        178 2 1 0
        192 2 1 1
        193 2 0 1
        197 1 0 0
        199 1 0 0
        203 2 0 0
        209 2 1 1
        213 1 1 1
        221 2 1 1
        224 1 0 0
        229 2 0 0
        231 1 0 0
        233 1 1 1
        234 1 0 1
        239 1 0 1
        243 1 1 1
        245 2 1 1
        247 1 1 1
        249 2 0 0
        270 2 0 0
        282 1 0 0
        287 1 0 0
        288 2 1 1
        293 1 0 0
        306 2 1 0
        310 2 0 0
        317 1 1 1
        332 2 0 0
        335 1 1 1
        340 2 0 0
        341 2 1 0
        352 2 0 0
        353 1 1 1
        354 1 1 1
        358 2 0 0
        364 2 1 0
        366 2 0 0
        367 2 0 0
        373 1 0 0
        375 1 1 1
        377 1 0 0
        380 2 0 0
        381 2 0 1
        390 1 1 1
        397 2 0 0
        400 2 1 1
        401 1 1 1
        402 2 1 0
        408 2 0 0
        411 1 1 1
        412 1 0 0
        416 2 1 1
        418 2 1 1
        421 1 1 0
        428 2 1 1
        429 1 0 0
        433 2 0 0
        435 1 1 1
        440 1 0 0
        442 2 1 1
        446 1 0 0
        449 1 0 0
        end

        Comment


        • #19
          Thank you Bruce. Closing this post-chat. Thanks for your advices.
          Kindly, Natallia

          Comment

          Working...
          X