Closed jonkatz2 closed 1 year ago
Thanks @jonkatz2 for reporting this error! The fuction PredictResponse
was designed as an auxiliary function in R package and we only considered about the situation where one values is assigned to parameter dose
. That's why there was an error while a vector of dosages was given.
I think it's resonable to allowing for predicting response values for multiple dosages at one calling, so I have modified the source code for the package. It is ok to run the codes PredictResponse(df=resp, dose=unique(resp$dose))
with the package version > 3.4.1.
NOTE: The output from this function would be a little bit different from the prediction function from drc::drm()
, when the predicted response value for the given dosage is larger than 100. PredictResponse
function adjusts all the response values (which are larger than 100) to 100 + stats::runif(1, -0.01, 0)
. All of the response values less than or equal to 100 will not be adjusted.
Excellent package! I have been using the package for about a year, but last week I updated and this function no longer works. Try this example:
Maybe it should be
if(length(pred) > 100)
? For now I am just calling drc::drm() directly, so not an emergency.