Announcement

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

  • graph dot for stsum

    Hi,

    I would like to create a graph dot with the median age estimated using stsum. stsum store the median age results in r(p50) but I cannot build a dot graph using that result.

    I tried:

    stsum, by(wave female rip2 edu2)
    local text=r(p50)

    graph dot `text', over(wave) over(edu2) over(rip2) by(female) exclude0 legend(on)

    But I don't get the right estimates

    Here an example of the graph I would like to have:
    Click image for larger version

Name:	Graph_medianage.jpg
Views:	1
Size:	25.0 KB
ID:	1716326


    Thank you
    Elisa

  • #2
    That isn't going to work because your local macro contains one (and only one) numeric result, the last median calculated. The documentation doesn't imply otherwise, but it isn't in my view clear that the saved results are fairly useless.

    It being a numeric result creates a fatal syntax error (I presume; you seem to imply that you got a graph but it was wrong) and it containing just one result means that even in principle you don't have the information there to supply to a graph command.

    Survival analysis is not what I ever do, but this is a start on an answer explaining why that didn't work. You must get at your plot otherwise and I trust that someone will explain in terms of technique that will replicate stsum results.

    Comment

    Working...
    X