# Calculating a number of ED values (a SGC method).
ltx1<-c(0.032,1.61,2.55,3.21,3.87,0.031,1.55) # Lx/Tx for the first aliquot
ltx2<-c(0.025,1.44,2.47,3.35,4.17,0.033,1.47) # Lx/Tx for the second aliquot
ltx3<-c(0.027,1.51,2.68,3.52,4.41,0.021,1.39) # Lx/Tx for the third aliquot
ltx4<-c(0.018,1.71,2.28,3.81,4.03,0.017,1.62) # Lx/Tx for the four aliquot
ltx5<-c(0.026,1.49,1.99,3.43,4.17,0.015,2.01) # Lx/Tx for the five aliquot
ltx<-cbind(ltx1,ltx2,ltx3,ltx4,ltx5)
ltx<-cbind(apply(ltx,MARGIN=1,mean),
apply(ltx,MARGIN=1,sd)) # means and standard deviations
redose<-c(0,18,36,54,72,0,18) # the same ReDose for the five aliquots
Curvedata<-data.frame(redose,ltx)
Ltx<-cbind(c(0.5,1.0,1.8,2.3,2.8,3.1,3.6,4.0),rep(0.1,8))
calED(Curvedata,Ltx,model="exp",origin=FALSE) # fitting y=a*(1-exp(-b*x))+c
Run the code above in your browser using DataLab