Hi, I am using R on Windows XP. I am using 'arrows' funtion to plot the variance as error bar, BUT error bar goes only one side of the data point, I need to plot the error bar on both side of the data point (plot is attached), I am using following commands to plot, plot(file3$lat,file3$STotwoKm,pch=21,cex=2.5,ylim=c(-0.2,2.5),xlim=c(-50,50),xlab=NA,ylab=NA, col=1, xaxs="i",yaxs="i") arrows(file3$lat, file3$var1, file3$lat,file3$STotwoKm, col=1, code=3, angle=90, length=0.1) Here: lat=latitte (x-axis) STotwoKm = Data values (y-axis) Var1 = Variance Kindly help how I can plot error bar on both side of data point, Many thanks, Regards, Yogesh -- Yogesh K. Tiwari (Dr.rer.nat), Scientist, Indian Institute of Tropical Meteorology, Homi Bhabha Road, Pashan, Pune-411008 INDIA Phone: 0091-99 2273 9513 (Cell) : 0091-20-258 93 600 (O) (Ext.250) Fax : 0091-20-258 93 825
> I am using 'arrows' funtion to plot the variance as error bar, BUT error > bar goes only one side of the data point, I need to plot the error baron> both side of the data point (plot is attached), I am using following > commands to plot, > > plot(file3$lat,file3$STotwoKm,pch=21,cex=2.5,ylim=c(-0.2,2.5), > xlim=c(-50,50),xlab=NA,ylab=NA, > col=1, xaxs="i",yaxs="i") > > arrows(file3$lat, file3$var1, file3$lat,file3$STotwoKm, col=1, code=3, > angle=90, length=0.1)Try using the arrows function with y0 as the lower error bound, y1 as the upper error bound and code=3, so that arrowheads are drawn at both ends of the arrow. You should double check the y coordinates of the arrows. If the y values are normally distributed, then a 95% confidence interval will give lower bounds at yvalues + qnorm(0.025)*sqrt(variance), and an upper bound at yvalues + qnorm(0.975)*sqrt(variance). Regards, Richie. Mathematical Sciences Unit HSL "Statistics are like a lamp-post to a drunken man - more for leaning on than illumination." David Brent, The Office. ------------------------------------------------------------------------ ATTENTION: This message contains privileged and confidential inform...{{dropped:20}}
Maybe Matching Threads
- climatological standard deviation- (question re-posted)
- need help in reading TOMS observed ASCII data file
- climatological standard deviation
- how to calculate growth rate of a variable
- how to convert decimal date to its equivalent date format(YYYY.mm.dd.hr.min.sec)