Announcement

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

  • Kernel Density Plots: Why I obtain an Error?

    Hi everyone,

    I am trying to draw a kernel density plot. But I obtain an error:

    Code:
    .  twoway `kden',  scheme(white_tableau) ///
    >      legend(subtitle("Tariff Types:", size(2)) label(1 "Clasico") label(2 "I
    > ndexado") label(3 "Sin Sorpresas") label(4 "Tarifa Justa") rowgap(0.25) size
    > (2)) ///
    >      title("{bf}Density Plot", pos(11) size(2.75)) ///
    >      ytitle("Density", size(2) orient(horizontal)) ///
    >      ylabel(, nogrid labsize(2)) ///
    >      xtitle("Spanish ZIP Codes (Two-Digits)", size(2)) ///
    >      xlabel(, nogrid labsize(2)) ///
    >      subtitle("Contract Types, by ZIP Code", pos(11) size(2)) 
    insufficient observations
    r(2001);
    Code:
    . groups tariff_ekon_id2
    
      +---------------------------------------+
      | tariff~2     Freq.   Percent      %<= |
      |---------------------------------------|
      |      20A     18384      1.44     1.44 |
      |    20DHA    165269     12.92    14.36 |
      |    20DHS      1183      0.09    14.45 |
      |     20TD   1039954     81.31    95.77 |
      |      20a         7      0.00    95.77 |
      |---------------------------------------|
      |    20dha         9      0.00    95.77 |
      |      21A      2345      0.18    95.95 |
      |    21DHA      5925      0.46    96.41 |
      |    21DHS        43      0.00    96.42 |
      |    21dha         1      0.00    96.42 |
      |---------------------------------------|
      |       30     11907      0.93    97.35 |
      |     30TD     31832      2.49    99.84 |
      |       31       424      0.03    99.87 |
      |      61A        16      0.00    99.87 |
      |     61TD      1536      0.12    99.99 |
      |---------------------------------------|
      |      62A         1      0.00    99.99 |
      |     62TD        29      0.00    99.99 |
      |     63TD        17      0.00   100.00 |
      |     64TD        51      0.00   100.00 |
      |       No         1      0.00   100.00
    Could you please me in this process. Do I have to delete the extreme values? Or do I have to put them together?

    Thank you so much.
    Best,

    Michael

  • #2
    what's in `kden'?

    Comment


    • #3
      Hi George Ford:

      I found a solution.

      Thank you for your help.

      Best,

      Michael

      Comment

      Working...
      X