Closed gracezhihuizhao closed 7 months ago
The plot_allcurves function errors if not all of the models are able to be fit. This should not occur - that is, at least display the models that do fit and throw a warning message with the models that are not included in the plot.
simulated experimental dose groups
X <- rep(seq(from = 0,to = 10,length.out = 10),each = 3)
Parameters
alpha <- (-17.31) beta <- (-11.54) beta_1 <- alpha/beta beta_2 <- alpha/(beta)^2
simulated experimental observed response data
set.seed(425) Y <- alpha*(X/beta +(X/beta)^2) + rt(df = 5,n = length(X))
true simulated curve
XC <- seq(from = 0,to = 10,length.out = 100) YC <- alpha*(XC/beta +(XC/beta)^2)
plot the simulated data
plot(X,Y,xlab = "dose",ylab = "response") abline(v = 0,h = 0,col = "red") abline(v = 5.77,col = "gray",lty = "dashed") lines(XC,YC,col = "black")
The plot_allcurves
function now should be able to warn the user if any curves from the output failed and plot rest of the successful curve fits. Testing with your codes will result in this warning message and a plot of rest of the curves:
output <- tcplfit2_core(X, Y, cutoff=2) plot_allcurves(output, X, Y)
This PR includes:
concRespCore
ortcplhit2_core
output and plots the observed concentration response data with the winning model.tcplfit2_core
output and plots the observed concentration response data along with all the model fits.