I am trying to use raw data to make a graph plotting point estimates and confidence intervals. I am importing the data from Excel, not using margins to create it. So I am using -twoway- with both -scatter- and -rcap- in the same command. But when I do so, the markers from -scatter- appear to be not quite lined up perfectly with the lines from -rcap-. In other words, the spikes do not go through the center of the markers, but are slightly off. Here is some example code that does the equivalent of what I am trying to do. Does anyone know why this is happening or how I can fix it? Thank you.
sysuse auto, clear
keep in 1/4
gen high = price + 1000
gen low = price - 1000
twoway (scatter price gear_ratio, mcolor(gs6) msize(medlarge) msymbol(D) mfcolor(white)) ///
(rcap low high gear_ratio, lwidth(medthick) lpattern(shortdash) lcolor(gs6) msize(large))
Related Posts with Markers from -scatter- not aligned with spikes from -rcap-
IVQREG2: module to estimare structural quantile functions now available in SSCDear All: Thanks to Kit Baum, ivqreg2 is now available in SSC. This module estimates the structura…
How to create a dummy variable from two variablesHi! I have a dataset with two variables for test scores: scores in 2002 and scores in 2013. I want n…
Adding percentiles to boxplotsHello, I am using this code for boxplots - graph box , /// over(month, relabel()) /// title …
Cox proportional hazards model a non constant covariateDear stata listers I'm using stata to analyse time-to-event data. Specifically, I'm trying to relat…
Stationary residuals. Spurious regression?Greetings Stata Users. I'm trying to estimate the public spending role over economic growth. So bas…
Subscribe to:
Post Comments (Atom)
0 Response to Markers from -scatter- not aligned with spikes from -rcap-
Post a Comment