I'm very new to R and also statistics, so the basics are lost on me. In the past I have done some simple experiments with chemicals and calculating the LC50 from binary responses (dead or alive). However, this time, I must calculate the LC50 from continuous response variables; for example: toxicant concentrations (independent variable) by absorbance values of a metabolic compound (continuous dependent variable). How do I go about doing this? I need to obtain the LC50 to be able to perform sublethal tests with the toxicants.
I've read around I'm not sure if it's a good idea to normalise these values as a percentage of the untreated control group then do a regression because of potential information loss(?)
I'll appreciate any suggestions and insight.
EDIT1: Thanks for the responses. Honestly I am even more confused now as I don't understand how to perform these tasks or what I am doing wrong when I attempt it in R. I've tried @Ben Bolker's suggestion and got a negative xmid. Forgive me if the format is not correct but here is a direct copy of the code I used and bit more information about the data: I have 6 test concentrations from 0 up to 200 mg/L and 18 observations per treatment (n=3).
I entered the following lines of code:
plot(PU$Concentration, PU$fluorescence, xlab="Concentration", ylab="fluorescence",col="green", pch=19, cex=2)
testmodel<-nls(fluorescence~SSlogis(Concentration,Asym,xmid,scal), data=PU) summary(testmodel)
This was the output:
_Formula: fluorescence ~ SSlogis(Concentration, Asym, xmid, scal)
Parameters: Estimate Std. Error t value Pr(>|t|) Asym 1319849.9 2757240.6 0.479 0.633 xmid -106.6 711.0 -0.150 0.881 scal -192.9 151.6 -1.272 0.206
Residual standard error: 98540 on 105 degrees of freedom
Number of iterations to convergence: 0 Achieved convergence tolerance: 4.008e-06_
How would one interpret this? How can the xmid be negative?
nls(response ~ SSlogis(dose, Asym, xmid, scal), data = ...)
thexmid
parameter should be your LC50 value. $\endgroup$SSlogis()
function, however, assumes that there is a 0 asymptotic value at high concentrations. Thus it won't fit your data properly. In a comment on my answer, @BenBolker noted aSSfpl()
function that can work with a non-0 limiting value. The increase in fluorescence between a concentration of 0 and the lowest non-0 concentration might be hormesis, which would require the more complex models provided by thedrc
package I linked in my answer. $\endgroup$nls()
(on values from your plot )with the 4-parameter logistic fitSSfpl()
instead ofSSlogis()
to allow for a non-zero asymptote at high concentrations. That seemed to work fine. Thedrc
package has a similarLL.4()
function to use with itsdrm()
fitting function. The syntax indrc
is a bit awkward, but worth learning if you will be doing this a lot. Thedrc
package also has functions that will fit hormesis, for exampleBC.5()
that allows for both hormesis and a non-zero asymptote. Both of those functions indrc
also work on the data in your plot. $\endgroup$nls()
with theSSfpl()
logistic fit and I keep getting this error:testmodel<-nls(fluorescence~SSfpl(Concentration,Asym,xmid,scal), data=PU)
Error in SSfpl(Concentration, Asym, xmid, scal) : argument "scal" is missing, with no default So I changed the scal to 200,000 (I didn´t know what number to put as I didn't understand the language of the help guide) and it returned a similar error but this time for xmid Error in SSfpl(Concentration, Asym, xmid, scal = 5e+05) : argument "xmid" is missing, with no default $\endgroup$