[R] question with drm function in "drc package"

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Mon Dec 7 22:33:44 CET 2015


The fine manual for the drm function mentions a parameter "logDose" ... I expect that since you did not specify it that the drm function is helpfully attempting to take the log of your data for you. 

I highly recommend reading up on making reproducible examples so your helpers can experiment with your problem directly instead of guessing by reading only. Of course,  you would then want to post using plain text as the Posting Guide indicates so the HTML would not corrupt your code.

http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
-- 
Sent from my phone. Please excuse my brevity.

On December 7, 2015 1:05:32 PM PST, li li <hannah.hlx at gmail.com> wrote:
>Hi Jeff,
>  I am not sure where the log of 0 was taken?
>  Thanks.
>    Li
>
>2015-12-07 15:55 GMT-05:00 Jeff Newmiller <jdnewmil at dcn.davis.ca.us>:
>
>> Log of zero is infinity. Don't do that.
>> --
>> Sent from my phone. Please excuse my brevity.
>>
>> On December 7, 2015 12:15:48 PM PST, li li <hannah.hlx at gmail.com>
>wrote:
>>
>>> Hi all,
>>>   I am trying to use the drm function in drc package to fit a 4 PL
>or 3PL
>>> curve for an assay response. Please see the listed data below. When
>I do
>>> the curve fitting, it returns the following error message. Anyone
>who
>>> familiar with this have any input on what went wrong?
>>>    Thanks so much in advance!!
>>>       Hanna
>>>
>>>  dat
>>>>
>>>       values   log_dose
>>> 1   -68.1125  3.9120230
>>> 2   -73.8955  3.9120230
>>> 3   -75.1235  3.9120230
>>> 4   -47.3205  3.2188758
>>> 5   -52.9835  3.2188758
>>> 6   -58.0075  3.2188758
>>> 7     8.2515  2.5257286
>>> 8   -24.5925  2.5257286
>>> 9   -18.1425  2.5257286
>>> 10   75.3375  1.8325815
>>> 11   89.3755  1.8325815
>>> 12  115.9685  1.8325815
>>> 13  345.7675  1.1394343
>>> 14  470.8125  1.1394343
>>> 15  514.8985  1.1394343
>>> 16
>>> 1003.2235  0.4462871
>>> 17 1033.0345  0.4462871
>>> 18  866.1365  0.4462871
>>> 19 1383.6525 -0.2468601
>>> 20 1431.3245 -0.2468601
>>> 21 1459.8025 -0.2468601
>>> 22 1852.5795 -0.9400073
>>> 23 1917.8015 -0.9400073
>>> 24 1858.0875 -0.9400073
>>> 25 1995.1185 -1.6331544
>>> 26 2033.9455 -1.6331544
>>> 27 1991.0405 -1.6331544
>>> 28 2064.5855 -2.3263016
>>> 29 2043.5195 -2.3263016
>>> 30 2089.8525 -2.3263016
>>> 31 2147.8445 -3.0194488
>>> 32 2047.7905 -3.0194488
>>> 33 2002.5375 -3.0194488
>>> 34 2075.2665 -3.7125960
>>> 35 2068.3545 -3.7125960
>>> 36 2055.9605 -3.7125960
>>>
>>>>  mod1 <- drm(values~log_dose, fct=LL.4(), data=dat)
>>>>
>>> Error in optim(startVec, opfct, hessian = TRUE, method = optMethod,
>control
>>> = list(maxit = maxIt,  :
>>>   initial value in 'vmmin' is not finite
>>> Error in drmOpt(opfct, opdfct1, startVecSc,
>>> optMethod, constrained,
>>> warnVal,  :
>>>   Convergence failed
>>>
>>>>
>>>>
>>>  [[alternative HTML version deleted]]
>>>
>>> ------------------------------
>>>
>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>

	[[alternative HTML version deleted]]



More information about the R-help mailing list