Announcement

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

  • adding title to the graph while using graph export command

    Hello STATAlist members,
    I am doing psmatch2 test for my study and am running the following codes. After which I want to export the graph directly. For that also, I specified a code and its saving. However, I want add titles of the graph, but once I saved as a png file, i cant edit that graph. So is there any option to add the title on the command options itself. I have given my codes here. It would be greatful if someone help me out from this.
    psmatch2 migrant if final_consent_code == 1 & total_income_yearly, outcome(total_income_yearly) logit ate mahalanobis(rural sc st bc mbc dnc_new male age_years currentlymarried widowed_others upto_prim middleschool highschool highersecondary diploma graduate other_edu hh_members_final wc_selfempagri wc_selfempnonagri wc_casualagri wc_casualindustry wc_casualservice wc_salarypvt wc_otherwork house_rented_others housetype_Pucca housetype_Semipucca marginal small semimedium medium dist_highincome dist_uppermiddleincome dist_lowermiddleincome)

    pstest *rural sc st bc mbc dnc_new male age_years currentlymarried widowed_others upto_prim middleschool highschool highersecondary diploma graduate other_edu hh_members_final wc_selfempagri wc_selfempnonagri wc_casualagri wc_casualindustry wc_casualservice *wc_salarypvt wc_otherwork house_rented_others housetype_Pucca housetype_Semipucca marginal small semimedium medium dist_highincome dist_uppermiddleincome dist_lowermiddleincome if final_consent_code == 1 & total_income_yearly, graph both*

    graph export mig_mahalanobis_bias.png

    psgraph, t( _treated) sup( _support) p( mypscore)

    graph export mig_mahalanobis_matching.png

  • #2
    psmatch2 is from SSC, as you are asked to explain (FAQ Advice #12). Either modify the ado-file to allow twoway options or install addplot from SSC. Note that the modifications will be to the GPH file and then you can export as PNG.

    Code:
    ssc install addplot, replace
    help addplot

    Comment


    • #3
      Hello Musau,

      Thanks for your response to my question. I will correct my mistakes surely. Thanks again.

      Comment

      Working...
      X