Announcement

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

  • Visualizing a bounded variable in the interval [0,1] against a binary variable

    What will be the best way to visualize a bounded variable in the interval [0,1] against a binary variable?

    Example dataset:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float c_vector byte livestock_ownership
            0 1
    .11111111 1
    .05555556 1
            0 1
            0 1
            0 1
            0 1
    .05555556 1
    .05555556 1
    .22222222 1
    .11111111 0
            0 1
    .16666667 1
    .05555556 1
    .05555556 1
    .05555556 1
     .3333333 1
    .05555556 1
    .11111111 1
    .22222222 1
    .11111111 0
    .22222222 1
     .3333333 1
    .44444445 1
    .11111111 1
            0 1
    .16666667 0
    .05555556 1
    .22222222 1
            0 1
            0 0
            0 1
            0 0
            0 0
            0 1
            0 1
    .05555556 0
    end
    label values livestock_ownership HV246
    label def HV246 0 "no", modify
    label def HV246 1 "yes", modify
    Thanks.

  • #2
    I would recommend a quantile or dot or strip plot.

    The detail that you have some exact zeros is likely to be important. On the other hand the outcome looks like counted fractions m/n and the spikey nature of the distribution may be just noise.
    Last edited by Nick Cox; 06 Sep 2023, 06:53.

    Comment


    • #3
      Thank you, Nick.

      Comment

      Working...
      X