[R-sig-eco] add mean, SE and SD lines to a non-linear regression

Luis Fernando García luysgarcia at gmail.com
Wed Sep 11 03:50:24 CEST 2013


Hello R friends,

I have a serious issue on R. I have some data about the functional response
of a spider, over some prey, I am really needing to plot the data and add
mean and
SD and or SE bars to the graph but I have not found out how to do it!

Does some of you have some idea about how to do it?

Here it goes my data and what I have done (data table is attached)

lycosa=read.table("C:\\Users\\Luis Fernando
Garcia\\R\\RFlycosa.txt",header=T)
attach(lycosa)
model<-nls(Eaten~SSmicmen(Density,a,b))
plot(Density,Eaten,pch=as.numeric(Prey))
xv<-seq(0,10,1)
yv<-predict(model,list(Density=xv))
lines(xv,yv)

please, if somebody knows how to do this I would be very thanked! I would
like my data could look like the figure 8 of this paper.
http://www.sciencedirect.com/science/article/pii/S1382668913001312

All the best!
-------------- next part --------------
Prey	Density	Eaten		
Lepidopteran	1	2		
Lepidopteran	1	3		
Lepidopteran	1	3		
Lepidopteran	3	4		
Lepidopteran	3	5		
Lepidopteran	3	4		
Lepidopteran	5	7		
Lepidopteran	5	5		
Lepidopteran	5	6		
Lepidopteran	10	8		
Lepidopteran	10	10		
Lepidopteran	10	7		
				
				
				
				
				
				
				
				


More information about the R-sig-ecology mailing list