I use qreg in Stata to run a quantile regression, then I want to graph a quantile regression plot for one coefficient using grqreg. I can produce a graph without any issues as long as I don't try to title it. When I put my title in "variable - dataset" I get the error message:
Number of titles different from number of variables
Some example code outlining the problem is below:
*setup
webuse auto, clear
keep price mpg headroom foreign
compress
*running quantile regression
qreg price mpg headroom foreign
*creating a quantile regression plot for the binary variable foreign
grqreg foreign, ci ols olsci graphregion(color(white))
*so far everything works and is uncontroversial
*now i quietly re-run the quantile regression
quietly: qreg price mpg headroom foreign
*and try to put a title on this graph with multiple words
*none of the below work
*grqreg always seems to think that each word in the title relates to a variable
grqreg foreign, ci ols olsci title(this is a title using multiple words)
grqreg foreign, ci ols olsci title("this is a title using multiple words")
grqreg foreign, ci ols olsci title('this is a title using multiple words')
grqreg foreign, ci ols olsci title((this is a title using multiple words))
*one worded title
quietly: qreg price mpg headroom foreign
grqreg foreign, ci ols olsci title(this_is_a_title_with_one_word)
Any help is greatly appreciated. Thank you!
title()
option ofgrqreg
works as its author intended and documented. So, the problem is not that the program misinterprets a command; it is that you want something different from that behaviour. – Nick Cox