[R-sig-eco] EC50 Calculations using Insect Size

Ben Bolker bbolker at gmail.com
Sat Jan 3 18:46:36 CET 2015


Katie Harding <katiemharding at ...> writes:

> 
> I have insect size measurements that I fit to a Weibull curve 
> to determine EC50.  This is my model 
> fit:model=nls(y~SSweibull(x,asym,drop,lrc,pwr))
> I need to use the untreated buffer samples as the maximum size 
> (the left most asymptope).  If I put the doses
> as 0,1,2,4,8,16,32,64,128 ppm, 
> I get error messages indicating that 0 values for x are inappropriate.
>  This is the error message:Error in qr.default(.swts * 
> attr(rhs, "gradient")) :   NA/NaN/Inf in
> foreign function call (arg 1) 
> I found that I get more consistent results when I put
>  0.01 for the dose of the untreated controls.  I was
> wondering if there was a convention to follow when using 
> untreated buffer samples in EC50 calculations.  Cheers,Katie


Are you measuring a mortality response?  If so, you should probably
be allowing the responses to be binomial rather than using least-squares
(as nls() does).

 The drc package from CRAN might be helpful (it has a built-in
weibull response function).

  Can you be slightly more specific/give a reproducible example?



More information about the R-sig-ecology mailing list