Announcement

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

  • Automatically save graphs into folder

    Hello
    is there a way where I can run code and stata automatically saves the graphs in my folder. Need to run this code and output takes a while.that way i can leave it going for the next 4 hrs and just check back later for the graph pictures

    Code:
    meologit q5_ i.procedure_t_c##pre_postno ||ptid:,vce(robust) or level(95)
    margins i.procedure_t_c#pre_postno, predict(outcome(2))
    margins i.procedure_t_c#pre_postno, predict(outcome(3))
    margins i.procedure_t_c#pre_postno, predict(outcome(4))
    marginsplot, by(procedure_t_c)
    
    ///save marginsplot graph for q5 then repeat for q1

  • #2
    You can add the twoway option name() as an option to marginsplot and subsequently save (or export) the graph into a folder of your choice:
    Code:
    marginsplot, by(procedure_t_c) name("procedure_t_c")
    graph save "/myfolder/procedure_t_c"

    Comment

    Working...
    X