aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/drplot.R12
1 files changed, 8 insertions, 4 deletions
diff --git a/R/drplot.R b/R/drplot.R
index 85e174f..3573fd9 100644
--- a/R/drplot.R
+++ b/R/drplot.R
@@ -193,23 +193,27 @@ drplot <- function(drresults, data,
logED50 <- fits[j,"logED50"]
mtype <- as.character(fits[j, "mtype"])
if (mtype == "probit") {
- lty <- ltys[nl <- nl + 1]
+ if (overlay) nl <- nl + 1 else nl = j
+ lty <- ltys[nl]
scale <- fits[j,"b"]
plot(function(x) pnorm(-x,-logED50,scale),lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty)
}
if (mtype == "logit") {
- lty <- ltys[nl <- nl + 1]
+ if (overlay) nl <- nl + 1 else nl = j
+ lty <- ltys[nl]
scale <- fits[j,"b"]
plot(function(x) plogis(-x,-logED50,scale),lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty)
}
if (mtype == "weibull") {
- lty <- ltys[nl <- nl + 1]
+ if (overlay) nl <- nl + 1 else nl = j
+ lty <- ltys[nl]
location <- fits[j,"a"]
shape <- fits[j,"b"]
plot(function(x) pweibull(-x+location,shape),lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty)
}
if (mtype == "linlogit") {
- lty <- ltys[nl <- nl + 1]
+ if (overlay) nl <- nl + 1 else nl = j
+ lty <- ltys[nl]
plot(function(x) linlogitf(10^x,1,fits[j,"c"],fits[j,"logED50"],fits[j,"b"]),
lld - 0.5, lhd + 2,
add=TRUE, col=color, lty=lty)

Contact - Imprint