Announcement

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

  • MD ARIFUL ISLAM
    started a topic Add legend using grqreg

    Add legend using grqreg

    Hi,

    I want to add legend after running grqreg. the codes are
    . webuse auto, clear
    . sqreg price weight length foreign, quantile(.2 .4 .6 .8) reps(100)
    . grqreg weight, cons ci ols olsci

    After running this I want add legend below the graph of each line and 95% Conf. Interval

    Thanks and regards,

    Ariful

  • Liu Qiang
    replied
    Originally posted by MD ARIFUL ISLAM View Post

    Dear Liu Qiang,

    Thanks a lot. It works but I don't know why the final graph is coming only (0 .2 .4 .6 .8 1) quantile. I tried a lot but can't not make the Y axis (0.1 .25 0.50 .75 .90) quanlite. Do you have any idea- how can I solve it?

    Thanks and regards,

    Ariful
    Hi MD,
    you have to change the option in your -sqreg- to quantile(0.1 .25 0.50 .75 .90)

    Leave a comment:


  • MD ARIFUL ISLAM
    replied
    Originally posted by Liu Qiang View Post
    Hi MD, here is a code for your reference

    Code:
    sysuse auto,clear
    sqreg price weight length foreign, quantile(.2 .4 .6 .8) reps(100)
    grqreg, cons ci ols olsci save(temp)
    use temp.dta,clear
    tw (rarea weight_cihi weight_cilo qtile,sort col(gs13) fc(gs13)) ///
    (line weight qtile,sort), legend(order(1 "Coef" 2 "95% Interval"))
    Dear Liu Qiang,

    Thanks a lot. It works but I don't know why the final graph is coming only (0 .2 .4 .6 .8 1) quantile. I tried a lot but can't not make the Y axis (0.1 .25 0.50 .75 .90) quanlite. Do you have any idea- how can I solve it?

    Thanks and regards,

    Ariful

    Leave a comment:


  • Liu Qiang
    replied
    Originally posted by MD ARIFUL ISLAM View Post

    Hi Scott,

    I am extremely sorry that I can't figure out the code. Can you please help me what can be the probable stata code for adding legend.
    Hi MD, here is a code for your reference

    Code:
    sysuse auto,clear
    sqreg price weight length foreign, quantile(.2 .4 .6 .8) reps(100)
    grqreg, cons ci ols olsci save(temp)
    use temp.dta,clear
    tw (rarea weight_cihi weight_cilo qtile,sort col(gs13) fc(gs13)) ///
    (line weight qtile,sort), legend(order(1 "Coef" 2 "95% Interval"))

    Leave a comment:


  • MD ARIFUL ISLAM
    replied
    Originally posted by Scott Merryman View Post
    Use the -grqreg, saving()- option and construct the graphs by hand.
    Hi Scott,

    I am extremely sorry that I can't figure out the code. Can you please help me what can be the probable stata code for adding legend.

    Leave a comment:


  • Scott Merryman
    replied
    Use the -grqreg, saving()- option and construct the graphs by hand.

    Leave a comment:

Working...
X