Announcement

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

  • coefplot, mlabel(@pval) error

    I am working on coefplot and would like to have p-value be assigned to the plot.
    I found a code example from here: http://repec.sowi.unibe.ch/stata/coefplot/markers.html
    Code:
    sysuse auto, clear
    keep if rep78>=3
    regress mpg headroom i.rep##i.foreign
    coefplot, xline(0) mlabposition(1) mlabgap(*2) ///
    mlabel("{it:p} = " + string(@pval,"%9.3f"))
    However, instead of having a coefficient plot with pvalue as the markers, I received error messages:
    "@pval not found
    invalid syntax
    r(111);"

    This did not happen if I change mlabel to: "mlabel(@b)" to post coefficients as the marker label.
    Is there any STATA user that could help me to get the above code to work? I am using STATA 14 IC.
    Thanks
    Last edited by Yohanes Kunto; 16 Nov 2017, 20:49.

  • #2
    I know that it has been quite a long time, but I thought I might follow up nonetheless since I also had this issue. It appears you may not have had the latest version of coefplot installed or Stata was otherwise unable to load the latest version. I found that by uninstalling and reinstalling the newest version of the .ado, it was able to find the @pvalue element. Cheers!

    Comment


    • #3
      I have the same problem, even though I seem to have installed the latest version of coefplot. Is there any other way to resolve this?

      Comment


      • #4
        I am also having this same issue.

        Comment


        • #5
          Like in Ryan's case, the code in #1 works fine for me. I have the following version of coefplot.

          Code:
          . which coefplot
          *! version 1.8.6  22feb2023  Ben Jann
          To update:

          Code:
          ssc install coefplot, replace

          Comment

          Working...
          X