Announcement

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

  • Graphing whole sample and partial sample

    I have a DV that has a different pattern when looking at whole sample, and when considering part of sample that took longer than 8.5 minutes to complete the study. that is, for participants with duration of study > 8.5, the DV follows expected pattern across different conditions, but when considering the entire sample, DV appears to be randomly distributed across conditions. I would like to show this in a graph, but can't seem to work out how to do it. Or even what is the best way to graphically depict it.

    I am new to this and would really appreciate any suggestions/help.


  • #2
    Following instructions here https://www.statalist.org/forums/help, Could you
    1. Provide an example of your dataset (use dataex)
    2. + show what you have done so far (Show us your code and output as explained in the faq)?
    Thank you
    Last edited by William Rossi; 19 Sep 2023, 02:52.

    Comment


    • #3
      Thanks for the reply William, let me know if this is right


      ----------------------- copy starting from the next line -----------------------
      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input float(dum flur) long audr
      1.0666667   . .
       2788.683   . .
      25.866667   . .
      .18333334   . .
       7184.867   . .
       .3333333   . .
       8.416667   . 3
       2.516667   . 2
            6.2   . 3
          43.65   . 1
       2.466667   . 1
       3.166667   . 4
         1194.5   . 3
          24.65   . 4
      3.8166666   . 4
      1.0833334   . 1
      13.716666   . 1
       7.083333 100 2
          11.45  99 1
      11.516666 100 1
      12.333333 100 2
           7.55  99 2
              5   8 1
      11.833333  91 2
            3.6 100 1
      11.766666  92 4
      12.133333  83 3
          10.85  83 4
      12.616667 100 3
            1.5  60 2
           1.45  40 3
            1.6 100 1
          12.95  91 3
      10.766666  50 4
      11.966666  91 3
      15.466666  97 3
      10.283334  92 1
       2.416667  22 2
           12.2  63 2
       7.266667  86 1
      10.666667  95 2
            3.4 100 3
      10.583333 100 2
       5.416667  31 3
            9.1 100 2
           1.75  72 2
      11.366667  98 4
      14.666667  83 4
      2.2666667  78 3
       8.533334  51 4
      11.166667  10 2
      10.766666 100 4
          11.05 100 3
       9.133333  99 4
           4.75  78 3
           13.9  95 3
          15.25 100 2
            9.4 100 2
            1.5  44 1
          10.95 100 1
      11.733334 100 4
           1.75  81 4
      14.183333  91 4
      10.383333 100 2
       2.766667  68 4
          11.65 100 3
       7.183333  94 3
      2.2833333  25 1
      12.866667 100 2
      10.566667 100 2
      11.566667 100 2
           3.65 100 3
          10.85  91 4
           11.6  80 4
              3  94 1
      15.883333 100 3
       7.516667 100 4
      14.616667  78 1
           10.8  91 1
      1.7333333  13 2
      18.166666  86 3
      2.0666666  51 4
      10.066667 100 4
      30.516666  93 1
           7.45  20 4
            8.4  92 4
            1.7  83 2
       7.916667 100 1
       7.516667  81 4
      11.933333  93 1
      12.833333 100 3
      10.183333 100 1
      14.433333  60 4
      10.633333  94 1
      16.466667  66 2
      2.4333334  82 3
       7.583333  83 4
       2.966667 100 1
      10.383333 100 3
           1.75  78 4
      end
      label values audr trustr
      label def trustr 1 "simple", modify
      label def trustr 2 "simple noise", modify
      label def trustr 3 "complex", modify
      label def trustr 4 "complex noise", modify
      This is the two tables that I want to represent graphically (with confidence intervals for the means)

      . tabulate audr, summarize(flur)

      RECODE of |
      audionum |
      (audio |
      categorical | Summary of flur
      ) | Mean Std. dev. Freq.
      ------------+------------------------------------
      simple | 82.552239 27.21702 67
      simple no | 81.246575 25.26184 73
      complex | 84.43662 19.891658 71
      complex n | 73.535211 25.278354 71
      ------------+------------------------------------
      Total | 80.41844 24.75004 282

      . tabulate audr, summarize(flur), if dum>8.5

      RECODE of |
      audionum |
      (audio |
      categorical | Summary of flur
      ) | Mean Std. dev. Freq.
      ------------+------------------------------------
      simple | 94.242424 8.0429717 33
      simple no | 84.744681 23.305596 47
      complex | 87.878049 17.714676 41
      complex n | 77.75 26.358382 36
      ------------+------------------------------------
      Total | 85.955414 21.005904 157

      . cii means 67 82.55 27.17

      Variable | Obs Mean Std. err. [95% conf. interval]
      -------------+---------------------------------------------------------------
      | 67 82.55 3.319344 75.92272 89.17728

      . cii means 73 81.25 25.26

      Variable | Obs Mean Std. err. [95% conf. interval]
      -------------+---------------------------------------------------------------
      | 73 81.25 2.956459 75.35641 87.14359

      . cii means 71 84.44 19.89

      Variable | Obs Mean Std. err. [95% conf. interval]
      -------------+---------------------------------------------------------------
      | 71 84.44 2.360509 79.73211 89.14789

      . cii means 71 73.54 25.28

      Variable | Obs Mean Std. err. [95% conf. interval]
      -------------+---------------------------------------------------------------
      | 71 73.54 3.000184 67.55632 79.52368

      . cii means 33 94.24 8.04

      Variable | Obs Mean Std. err. [95% conf. interval]
      -------------+---------------------------------------------------------------
      | 33 94.24 1.399584 91.38914 97.09086

      . cii means 47 84. 23.31

      Variable | Obs Mean Std. err. [95% conf. interval]
      -------------+---------------------------------------------------------------
      | 47 84 3.400113 77.15593 90.84407

      . cii means 41 87.88 17.7

      Variable | Obs Mean Std. err. [95% conf. interval]
      -------------+---------------------------------------------------------------
      | 41 87.88 2.764276 82.29319 93.46681

      . cii means 36 77.75 26.36

      Variable | Obs Mean Std. err. [95% conf. interval]
      -------------+---------------------------------------------------------------
      | 36 77.75 4.393333 68.83106 86.66894

      .
      I am trying to create a bar graph with the four conditions on the x axis, depicting means for flur and flur if dum >8.5 with the confidence intervals.
      Last edited by masoud katiraei; 19 Sep 2023, 17:42.

      Comment

      Working...
      X