Closed brown-jason closed 1 year ago
Assigning to Grace.
Whether the errfun argument can be specified by the user
If we want to allow user to specify other error distributions
Thank you for this information, Grace, and looking into this issue.
@brown-jason, suggest maybe breaking this down into a series of tickets or 3 separate tickets to cover: (a) core functions, (b) model functions and tcplObj calling functions, and (c) probability 2 for hitcalling update for alternative error model?
@gracezhihuizhao, if you have a list of specific functions that will need the argument added to them that information will also be greatly appreciated to help scope out tasks if we want to implement the ability for users to have other error distributions.
@sedavid01 Here's a list.
ConcRespCore()
Thank you @gracezhihuizhao for providing a list of the functions that need to be updated if updating the error distribution options for dose-response modeling is desired.
@brown-jason, please determine what you would like to do with the error function options. Should tcplfit2 allow multiple error models for the regression fits, or do we want to restrict it to just a t-distribution?
Suggest reaching out to PI's/SME's that use the tcplfit2 package for their input.
@brown-jason suggestion:
The enhancement issue ticket related to this investigation was created. Closing this ticket.
The assumed error distribution in tcplfit2 is default a t-dist with 4 degrees of freedom. However, in the tcplObj function there is an option for dt4 and dnorm. If dnorm can be specified by a user when model fitting, then we need to update the 2 probability calculation in hitcontinner() to use pt(<>,4,<>) when "dt4" is specified and pnorm(<>,<>) when "dnorm" is specified.
Investigate whether the errfun argument can be specified by the user (i.e. can someone modeling data change the assumed distribution of model errors from the t-dist with 4 degrees of freedom to a normal distribution)? If no, then we are currently fine with how the code is and can address later how to update the package if we want users the ability to specify other error distributions. If yes, then another task needs to be created to update the 2nd probability calculation used in the hit-calling function to match the specified error distribution. May also have other tickets to allow the facilitation of this update.