Announcement

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

  • Qregplot

    Hello - I am using qregplot command to plot quantile for one of my variable by using the
    Code:
    quietly sqreg csad_all absrm rm2_all, quantiles (10 25 50 75 95 99) rep(100)
    qregplot rm2_all, twopt(name(g10,replace)) raopt( color(black%35)) label
    and I am getting the below plot.

    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	53.2 KB
ID:	1615728

    I need a plot like below that does not show the solid line area for the confidence interval.

    Click image for larger version

Name:	Capturee.JPG
Views:	1
Size:	15.2 KB
ID:	1615729

    Please advise.

    Regards,
    sara
    Last edited by sara haris ali; 22 Jun 2021, 03:44.

  • #2
    This is an option:
    qregplot, raopt(fcolor(%30) lcolor(%0))
    otherwise look at options for twoway rarea graphs

    Comment


    • #3
      From item 12.1 in the FAQ:

      If you are using community-contributed (also known as user-written) commands, explain that and say where they came from: the Stata Journal, SSC, or other archives. This helps (often crucially) in explaining your precise problem, and it alerts readers to commands that may be interesting or useful to them.
      I gather Sara is talking about the user-contributed program by Fernando Rios-Avila.

      Code:
      ssc describe qregplot
      HTH.
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 19.5 (Windows)

      Comment


      • #4

        Thanks, Fernando.
        One more query, how can I plot multiple quantiles via the qregplot after sqreg? we can do this after qreg, please see the below code and screen1 and it is plotting all quantiles between (1 (.5) 99) but when I run sqreg, the qregplot (screen 2) is just plotting the estimated quantiles and not all in the range. Please advise. Regards, Sara

        Code:
        webuse womenwk
        qreg wage age education i.married children i.county
        qregplot age, q(1(.5)99)
        Code:
        sqreg wage age education i.married children i.county, quantiles(.1 .25 .50 .75 .95 .99)
        qregplot age, q(1(.5)99)
        Click image for larger version

Name:	qreg - plot.JPG
Views:	1
Size:	61.0 KB
ID:	1615884 Click image for larger version

Name:	sqreg - plot.JPG
Views:	1
Size:	53.0 KB
ID:	1615885

        Comment


        • #5
          You can’t
          sqreg trumps qregplot q() option
          you just need to do qreg instead

          Comment


          • #6
            oh - I already calculated my estimates for 50 variables and now come to the graph part - is it ok if I use QREG for graphs while I estimated coefficients via SQREG.

            Comment

            Working...
            X