Announcement

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

  • ciplot using listwise deletion

    Dear Stata users,

    I am using Stata/IC 16.1. I have 4 binary variables (Yes=1 No=0). I want to plot 4 CIs, each indicating the proportion of people that responded yes. When I use this command, "ciplot m_depressed m_nervous m_sleep m_lonely" I get different estimates of the proportions. It seems to me that Stata is applying listwise deletion and is plotting CIs only for observations with complete values in all 4 variables. Instead, I don't want that.

    Does anyone know how I can work around this?

    Thank you,

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(m_depressed m_nervous m_sleep m_lonely)
    . . . .
    . . . .
    . . . .
    1 1 . .
    1 1 . 1
    . . . .
    1 1 0 .
    . . . .
    . 1 0 0
    . . . 1
    . 1 0 .
    . . . .
    . . . .
    . . . .
    . . . .
    . . 0 .
    . 1 0 .
    . . . 0
    1 1 . 1
    1 1 . 1
    1 . 0 1
    . . . .
    . . . .
    1 1 . 0
    1 . . .
    1 1 1 .
    . . . .
    0 . 0 0
    1 1 . .
    . . . .
    . . . .
    1 0 0 .
    . 0 . .
    . . . .
    1 1 . .
    1 1 1 1
    . . . .
    . 1 0 .
    . . 0 0
    . . . 0
    1 1 0 .
    . . . .
    . . . .
    . 0 . .
    1 . 0 0
    . . . .
    . 0 0 .
    . . . .
    . . . 1
    . . 0 .
    end
    label var m_depressed "Did you feel more depressed" 
    label var m_nervous "Did you feel more nervous?" 
    label var m_sleep "Did you have more trouble sleeping?" 
    label var m_lonely "Did you feel more lonely"



  • #2
    ciplot is from SSC, as you are asked to explain (FAQ Advice #12). The help tries to discourage you from using it!

    (note added August 2011)

    For fuller flexibility, consider using statsby first and then standard graphics commands
    You're right about what it does -- and it's ciplot that does it, not Stata -- about missing values.

    There is an undocumented option inclusive that does what you prefer. Looking at your data example makes me wonder whether that is the best idea.

    Comment


    • #3
      Thank you,

      The inclusive option worked.

      Comment

      Working...
      X