From 6d220f8d71564a0430473ab2465e169adddb02d8 Mon Sep 17 00:00:00 2001 From: ranke Date: Fri, 28 Apr 2006 11:42:14 +0000 Subject: - Fixed the drplot function, so the graphics parameter ask is adequately set depending on the overlay argument, and set back to the previous value - Added a test for each datase - Added a demo for each dataset - Corrected many small bugs in the documentation and improved formatting of the .Rd files git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/drfit@74 d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc --- tests/IM1xIPC81.R | 4 +++ tests/IM1xIPC81.Rout.save | 75 ++++++++++++++++++++++++++++++++++++++++ tests/IM1xVibrio.R | 4 +++ tests/IM1xVibrio.Rout.save | 57 +++++++++++++++++++++++++++++++ tests/XY.R | 4 +++ tests/XY.Rout.save | 37 ++++++++++++++++++++ tests/antifoul.R | 4 +++ tests/antifoul.Rout.save | 33 ++++++++++++++++++ tests/pyrithione.R | 4 +++ tests/pyrithione.Rout.save | 85 ++++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 307 insertions(+) create mode 100644 tests/IM1xIPC81.R create mode 100644 tests/IM1xIPC81.Rout.save create mode 100644 tests/IM1xVibrio.R create mode 100644 tests/IM1xVibrio.Rout.save create mode 100644 tests/XY.R create mode 100644 tests/XY.Rout.save create mode 100644 tests/antifoul.R create mode 100644 tests/antifoul.Rout.save create mode 100644 tests/pyrithione.R create mode 100644 tests/pyrithione.Rout.save (limited to 'tests') diff --git a/tests/IM1xIPC81.R b/tests/IM1xIPC81.R new file mode 100644 index 0000000..075c84d --- /dev/null +++ b/tests/IM1xIPC81.R @@ -0,0 +1,4 @@ +library(drfit) +data(IM1xIPC81) +rIM1xIPC81 <- drfit(IM1xIPC81,linlogit=TRUE) +rIM1xIPC81 diff --git a/tests/IM1xIPC81.Rout.save b/tests/IM1xIPC81.Rout.save new file mode 100644 index 0000000..b67ed2a --- /dev/null +++ b/tests/IM1xIPC81.Rout.save @@ -0,0 +1,75 @@ + +R : Copyright 2006, The R Foundation for Statistical Computing +Version 2.3.0 (2006-04-24) +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> library(drfit) +Loading required package: RODBC +> data(IM1xIPC81) +> rIM1xIPC81 <- drfit(IM1xIPC81,linlogit=TRUE) + +IM13 BF4: Fitting data... + +IM14 BF4: Fitting data... +Error in nls(response ~ linlogitf(dose, 1, f, logED50, b), data = tmp, : + singular gradient +Error in numericDeriv(form[[3]], names(ind), env) : + Missing value or an infinity produced when evaluating the model +In addition: Warning message: +NaNs produced in: pnorm(q, mean, sd, lower.tail, log.p) + +IM15 BF4: Fitting data... + +IM16 BF4: Fitting data... + +IM17 BF4: Fitting data... +Error in numericDeriv(form[[3]], names(ind), env) : + Missing value or an infinity produced when evaluating the model +In addition: Warning message: +NaNs produced in: pnorm(q, mean, sd, lower.tail, log.p) + +IM18 BF4: Fitting data... +Error in numericDeriv(form[[3]], names(ind), env) : + Missing value or an infinity produced when evaluating the model +In addition: Warning message: +NaNs produced in: pnorm(q, mean, sd, lower.tail, log.p) + +IM19 BF4: Fitting data... +Error in numericDeriv(form[[3]], names(ind), env) : + Missing value or an infinity produced when evaluating the model +In addition: Warning message: +NaNs produced in: pnorm(q, mean, sd, lower.tail, log.p) + +IM1-10 BF4: Fitting data... +> rIM1xIPC81 + Substance ndl n lld lhd mtype logED50 std unit +1 IM13 BF4 9 81 0.59176003 3.000000 inactive NA NA 然 +2 IM14 BF4 20 216 -0.01030017 3.176091 no fit NA NA 然 +3 IM15 BF4 9 135 0.59176003 3.000000 inactive NA NA 然 +4 IM16 BF4 9 108 0.59176003 3.000000 inactive NA NA 然 +5 IM17 BF4 9 81 0.59176003 3.000000 linlogit 2.5785719 0.03819482 然 +6 IM18 BF4 9 135 0.59176003 3.000000 linlogit 1.6806040 0.02982682 然 +7 IM19 BF4 9 81 0.59176003 3.000000 linlogit 1.6496121 0.02636274 然 +8 IM1-10 BF4 11 162 -0.01030017 3.000000 linlogit 0.7696961 0.04165397 然 + sigma a b c +1 NA NA NA NA +2 NA NA NA NA +3 NA NA NA NA +4 NA NA NA NA +5 0.2375857 2.5785719 2.300216 0.01468034 +6 0.2324871 1.6806040 2.237338 0.05719295 +7 0.1452716 1.6496121 1.976976 0.10956088 +8 0.2987708 0.7696961 1.936253 0.45808611 +> diff --git a/tests/IM1xVibrio.R b/tests/IM1xVibrio.R new file mode 100644 index 0000000..ed1a698 --- /dev/null +++ b/tests/IM1xVibrio.R @@ -0,0 +1,4 @@ +library(drfit) +data(IM1xVibrio) +rIM1xVibrio <- drfit(IM1xVibrio) +rIM1xVibrio diff --git a/tests/IM1xVibrio.Rout.save b/tests/IM1xVibrio.Rout.save new file mode 100644 index 0000000..5d37703 --- /dev/null +++ b/tests/IM1xVibrio.Rout.save @@ -0,0 +1,57 @@ + +R : Copyright 2006, The R Foundation for Statistical Computing +Version 2.3.0 (2006-04-24) +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> library(drfit) +Loading required package: RODBC +> data(IM1xVibrio) +> rIM1xVibrio <- drfit(IM1xVibrio) + +IM13 BF4: Fitting data... + +IM14 BF4: Fitting data... + +IM15 BF4: Fitting data... + +IM16 BF4: Fitting data... + +IM17 BF4: Fitting data... + +IM18 BF4: Fitting data... + +IM19 BF4: Fitting data... + +IM1-10 BF4: Fitting data... +> rIM1xVibrio + Substance ndl n lld lhd mtype logED50 std unit +1 IM13 BF4 13 22 -5.30103 4.69897 probit 3.9399128 0.03658457 然 +2 IM14 BF4 12 57 -4.30103 4.69897 probit 3.5442110 0.02060194 然 +3 IM15 BF4 7 20 -0.30103 4.69897 probit 3.1398488 0.01254468 然 +4 IM16 BF4 13 30 -4.30103 4.69897 probit 3.1804247 0.01801591 然 +5 IM17 BF4 10 20 -1.30103 4.69897 probit 2.4317301 0.03015341 然 +6 IM18 BF4 10 17 -2.30103 2.69897 probit 1.4015187 0.04053083 然 +7 IM19 BF4 13 22 -5.30103 2.69897 probit 0.7157942 0.02085130 然 +8 IM1-10 BF4 11 20 -6.30103 2.69897 probit -0.1790307 0.03623821 然 + sigma a b +1 0.06302893 3.9399128 0.5763074 +2 0.05905375 3.5442110 0.6561300 +3 0.02695476 3.1398488 0.5526675 +4 0.04514079 3.1804247 0.4881559 +5 0.04773317 2.4317301 0.6386547 +6 0.05611347 1.4015187 0.8008513 +7 0.02956284 0.7157942 0.6969275 +8 0.04098662 -0.1790307 0.8019351 +> diff --git a/tests/XY.R b/tests/XY.R new file mode 100644 index 0000000..e295be4 --- /dev/null +++ b/tests/XY.R @@ -0,0 +1,4 @@ +library(drfit) +data(XY) +rXY <- drfit(XY) +rXY diff --git a/tests/XY.Rout.save b/tests/XY.Rout.save new file mode 100644 index 0000000..7bcc0df --- /dev/null +++ b/tests/XY.Rout.save @@ -0,0 +1,37 @@ + +R : Copyright 2006, The R Foundation for Statistical Computing +Version 2.3.0 (2006-04-24) +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> library(drfit) +Loading required package: RODBC +> data(XY) +> rXY <- drfit(XY) + +Control: Fitting data... + +Substance X: Fitting data... + +Substance Y: Fitting data... +> rXY + Substance ndl n lld lhd mtype logED50 std unit sigma +1 Control 1 6 -Inf -Inf inactive NA NA mg/L NA +2 Substance X 4 12 1 3 probit 2.161905 0.02425144 mg/L 0.04131746 +3 Substance Y 4 12 1 3 active NA NA mg/L NA + a b +1 NA NA +2 2.161905 0.5061306 +3 NA NA +> diff --git a/tests/antifoul.R b/tests/antifoul.R new file mode 100644 index 0000000..f9c1a9d --- /dev/null +++ b/tests/antifoul.R @@ -0,0 +1,4 @@ +library(drfit) +data(antifoul) +rantifoul <- drfit(antifoul) +rantifoul diff --git a/tests/antifoul.Rout.save b/tests/antifoul.Rout.save new file mode 100644 index 0000000..5bc166c --- /dev/null +++ b/tests/antifoul.Rout.save @@ -0,0 +1,33 @@ + +R : Copyright 2006, The R Foundation for Statistical Computing +Version 2.3.0 (2006-04-24) +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> library(drfit) +Loading required package: RODBC +> data(antifoul) +> rantifoul <- drfit(antifoul) + +TBT: Fitting data... + +Zn Pyrithion: Fitting data... +> rantifoul + Substance ndl n lld lhd mtype logED50 std unit +1 TBT 38 135 -2.709271 2.39794 probit -0.1643560 0.05349216 然 +2 Zn Pyrithion 27 81 -2.107210 2.00000 probit -0.3979222 0.05393693 然 + sigma a b +1 0.1928611 -0.1643560 0.6763882 +2 0.2286560 -0.3979222 0.4169632 +> diff --git a/tests/pyrithione.R b/tests/pyrithione.R new file mode 100644 index 0000000..f05988d --- /dev/null +++ b/tests/pyrithione.R @@ -0,0 +1,4 @@ +library(drfit) +data(pyrithione) +rpyr <- drfit(pyrithione,linlogit=TRUE,linlogitWrong=c("MSPT","MSPHI")) +rpyr diff --git a/tests/pyrithione.Rout.save b/tests/pyrithione.Rout.save new file mode 100644 index 0000000..fb11ca9 --- /dev/null +++ b/tests/pyrithione.Rout.save @@ -0,0 +1,85 @@ + +R : Copyright 2006, The R Foundation for Statistical Computing +Version 2.3.0 (2006-04-24) +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> library(drfit) +Loading required package: RODBC +> data(pyrithione) +> rpyr <- drfit(pyrithione,linlogit=TRUE,linlogitWrong=c("MSPT","MSPHI")) + +Na Pyrithion: Fitting data... + +Pyridin: Fitting data... + +PyNO: Fitting data... + +(PT)2: Fitting data... + +MSO2P: Fitting data... + +MSPHI: Fitting data... + +PyS: Fitting data... +Error in nls(response ~ linlogitf(dose, 1, f, logED50, b), data = tmp, : + step factor 0.000488281 reduced below 'minFactor' of 0.000976562 + +Zn Pyrithion: Fitting data... + +Cu Pyrithion: Fitting data... + +Fe Pyrithion: Fitting data... + +(PyS)2: Fitting data... +Error in nls(response ~ linlogitf(dose, 1, f, logED50, b), data = tmp, : + singular gradient + +MSPT: Fitting data... + +TBT: Fitting data... + +NaJ: Fitting data... +> rpyr + Substance ndl n lld lhd mtype logED50 std unit +1 Na Pyrithion 20 108 -2.107210 2.00000 linlogit -0.3461318 0.04237833 然 +2 Pyridin 19 161 0.591760 3.69897 inactive NA NA 然 +3 PyNO 19 81 0.591760 3.69897 no fit NA NA 然 +4 (PT)2 19 81 -2.408240 2.00000 linlogit -0.4197031 0.05030460 然 +5 MSO2P 28 108 -1.709271 3.69897 inactive NA NA 然 +6 MSPHI 19 81 0.591760 3.69897 probit 3.6625025 0.06724673 然 +7 PyS 18 80 -0.408240 3.00000 probit 2.6817944 0.02031252 然 +8 Zn Pyrithion 27 81 -2.107210 2.00000 linlogit -0.4132885 0.06234927 然 +9 Cu Pyrithion 19 79 -2.408240 2.00000 linlogit -0.3074717 0.07918130 然 +10 Fe Pyrithion 19 81 -2.408240 2.00000 linlogit -0.3534572 0.07263386 然 +11 (PyS)2 20 81 -0.408240 3.00000 probit 1.7840499 0.05230663 然 +12 MSPT 18 108 -0.408240 3.00000 probit 2.1384811 0.03379904 然 +13 TBT 38 135 -2.709271 2.39794 linlogit -0.1580954 0.05474371 然 +14 NaJ 10 108 0.591760 3.30103 inactive NA NA 然 + sigma a b c +1 0.20857751 -0.3461318 2.1188272 -0.26698979 +2 NA NA NA NA +3 0.09188853 NA NA NA +4 0.20509070 -0.4197031 1.8466994 -0.51508088 +5 NA NA NA NA +6 0.12943273 3.6625025 0.4387540 NA +7 0.13401920 2.6817944 0.1250523 NA +8 0.22877916 -0.4132885 1.7424846 0.61078660 +9 0.24494451 -0.3074717 1.0150649 -0.04897422 +10 0.23383185 -0.3534572 1.1823558 0.02510613 +11 0.23298721 1.7840499 0.4098018 NA +12 0.22881257 2.1384811 0.2112625 NA +13 0.19264079 -0.1580954 1.0406576 -0.02416104 +14 NA NA NA NA +> -- cgit v1.2.1