Announcement

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

  • Problems with "graph hbar..., saving()"

    Dear colleauges, I am strugglying with Stata 14 and using the graph hbar save option. When I run the command lines, the graph is produced perfectly but is no where to be found after saving it.

    Kindly if you can tell me what am I doing wrong in the Code below, with all my thanks as I need to follow-up the saved graphs to use "graph combine" more than 1 graph.

    cd "d:"
    summ onereg , de
    local string=r(sum)
    mylabels 0(1)10, local(mylaby) myscale(@)
    #delimit ;
    graph hbar (median) totregtime , nofill over(nrgindex, label(labcolor(navy) valuelabel labsize(*.3))) blabel(bar, color(navy) size(tiny) format(%3.0f)) bar (1, color(orange))
    over(unitid, label(labcolor(maroon) valuelabel labsize(*.3)))
    ylabel(`mylaby', ang(h)labsize(tiny) labcolor(navy) tlcolor(navy) tstyle(minor)) ytitle("Average time (minutes)", size(vsmall) color(navy)) intensity(*0.7)
    title("Average daily recording time per register per patient", size(medsmall) color(navy) span)
    note("Source: Time & Motion 2016", size(tiny) span)
    saving(regtime);
    #delimit cr

  • #2
    Check where you are working with

    Code:
    pwd
    because Stata would save in that directory or folder without instructions to the contrary.

    Comment


    • #3
      I did check with pwd, it is going to "D:" - there is something odd either in my code or there is a bug somewhere. Both graphs are produced perfectly, however only graph "time1" is saved to d: and not "regcell". I also searched all locations, I am certain it is not saved anywhere else. With all my thanks.

      /*1st graph display*/
      summ onereg if nrgindex >34 & reptagC==1 & unitid~=. & nrgindex~=107, de
      local string=r(sum)
      mylabels 0(120)3000, local(mylaby) myscale(@)
      #delimit ;
      graph hbar (median) totreptime (median) nrgindexM if nrgindex >34 & reptagC==1 & unitid~=. & sone==1, nofill over(nrgindex, sort(order) descending label(labcolor(navy) valuelabel labsize(*.3)) axis(lcolor(emerald))) blabel(bar, color(navy) size(tiny) format(%3.0f))
      ylabel(`mylaby', ang(h)labsize(tiny) labcolor(navy) tlcolor(navy) tstyle(minor)) yscale(lcolor(emerald))
      ytitle("Average time (minutes)", size(vsmall) color(navy)) intensity(*0.7)
      title("Average reporting time per form", size(medsmall) color(navy) span)
      subtitle("`string' MONTHYLY reporting forms", size(small) color(maroon) span)
      legend(label(1 "Mean") label(2 "Total") row(1) col(3) color(navy) region(lstyle(none)) ring(0) position(3) size(tiny) symxsize(*.2) rowgap(*.2) colgap(*.2)keygap(*.2) region(lstyle(none)))
      legend(size(vsmall)) note("Source: Time & Motion 2016", size(tiny) span) saving(time1, replace);
      #delimit cr

      /** 2nd graph display*/
      summ onereg if nrgindex <35 & unitid~=. & unitid~=210, de
      local rstring=r(sum)
      mylabels 0(1)10, local(mylaby) myscale(@)
      #delimit ;
      graph hbar (median) totregtime if nrgindex <35 & sone==1 & unitid~=210 & sone==1, nofill over(nrgindex, sort(order) label(labcolor(navy) valuelabel labsize(*.3))) blabel(bar, color(navy) size(tiny) format(%3.0f)) bar (1, color(orange))
      over(unitid, label(labcolor(maroon) valuelabel labsize(*.3)))
      ylabel(`mylaby', ang(h)labsize(tiny) labcolor(navy) tlcolor(navy) tstyle(minor)) ytitle("Average time (minutes)", size(vsmall) color(navy)) intensity(*0.7)
      subtitle("`rstring' daily registers", size(small) color(maroon) span)
      title("Average daily recording time per register per patient", size(medsmall) color(navy) span)
      note("Source: Time & Motion 2016", size(tiny) span) legend(off) saving(regtime, replace);
      #delimit cr

      Comment

      Working...
      X