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-
Can't open miest.sterDear Statalist, I am trying do run a Cox regression on an imputed dataset using restricted cubic sp…
lower what does mean?hi friends. please help me to understand this code. what does mean lower? gen cityname2=lower(cityof…
Subpop MLM: Xtmixed Hi all, I am running a multi-level modeling using complex survey data, which used a stratified, clu…
How to compare prognostic models with a survivaldecision curve analysis for survival outcomes?Hello, i am currently using the dca (stdca) command in stata 14.0 I research a dataset of patients w…
Sample selection in the control function approachI am trying to understand what sample it is correct to use when estimating the models using the cont…
Subscribe to:
Post Comments (Atom)
0 Response to Markers from -scatter- not aligned with spikes from -rcap-
Post a Comment