Announcement

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

  • density plot y-axis (density) larger than 1

    Dear all,

    I am plotting three kdensity graphs in one graph. The variable "x" is for all the same (a log-transformed IRR). The conditions are different for the three graphs. I am using the code:
    Code:
    kdensity x if bothbritish ==1, addplot (kdensity x if (managerAggEthniciy== "white_anglo" & ceoAggEthniciy!= "white_anglo") | (ceoAggEthnici == "white_anglo" & managerAggEthniciy!= "white_anglo")|| kdensity x if (managerAggEthniciy!= "white_anglo" & ceoAggEthniciy!= "white_anglo")) legend (ring(0) pos (2) label (1 "bothbritish") label (2 "onebritish") label (3 "notbritish"))
    I do get the three graphs plotted in one, however, the density on the vertical axis exceeds 1. This can not be the case as to my understanding density within a graph = 1 (roughly speaking and not expressed in a scientifically correct way). Can someone help with interpreting this?

    Best
    Mar
    Click image for larger version

Name:	Picture1.png
Views:	1
Size:	104.8 KB
ID:	1584959


  • #2
    That is not a problem. The density is the proportion of cases per unit of log transformed deal IRR. If the density remains constant for on unit, then the density will tell you the proportion of cases that is contained in that on unit interval. The density does not remain constant, so that is why it can exceed 1.

    If Mar Kro is not your real name, then please see https://www.statalist.org/forums/help#adviceextras #3 on why we ask people to post under their real names.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment

    Working...
    X