Dear Stata users,
I need to apologize for not having a working code example, but I do not think that I can easily replicate my problem with respect to the details that matter. That written, I would be thankful even for the most general suggestions.
I analyze how the prices charged by hospitals depend on certain characteristics of the hospitals. Since I am interested in the conditional median, I use quantile regression:

The confidence interval for "Medium" does not include zero. The base category for comparison is "Low". Thus, I conclude that there is a significant difference between "Low" and "Medium" at the 95% level.
To show the results graphically, I use marginsplot. Before I do so, I run

With margins, the confidence interval for "Low" begins at 1013.94, and the confidence interval for "Medium" ends at 1017.187. Hence, there is no significant difference between "Low" and "Medium" at the 95% level. This is also suggested by the marginsplot:

I suppose that there is a difference between how qreg and margins determine standard errors. Can I get margins (or marginsplot) to use the standard errors and confidence intervals from qreg?
Boy, how much I enjoy finally working with Stata again. After a long break due to teaching obligations, I almost forgot how much fun it is - and I am not joking!
Best regards,
Sebastian
I need to apologize for not having a working code example, but I do not think that I can easily replicate my problem with respect to the details that matter. That written, I would be thankful even for the most general suggestions.
I analyze how the prices charged by hospitals depend on certain characteristics of the hospitals. Since I am interested in the conditional median, I use quantile regression:
Code:
qreg rate i.revisedcompliance_score i.code i.i_county, vce(robust)
The confidence interval for "Medium" does not include zero. The base category for comparison is "Low". Thus, I conclude that there is a significant difference between "Low" and "Medium" at the 95% level.
To show the results graphically, I use marginsplot. Before I do so, I run
Code:
margins i.revisedcompliance_score
With margins, the confidence interval for "Low" begins at 1013.94, and the confidence interval for "Medium" ends at 1017.187. Hence, there is no significant difference between "Low" and "Medium" at the 95% level. This is also suggested by the marginsplot:
I suppose that there is a difference between how qreg and margins determine standard errors. Can I get margins (or marginsplot) to use the standard errors and confidence intervals from qreg?
Boy, how much I enjoy finally working with Stata again. After a long break due to teaching obligations, I almost forgot how much fun it is - and I am not joking!
Best regards,
Sebastian
Comment