aboutsummaryrefslogtreecommitdiff
path: root/inst
diff options
context:
space:
mode:
authorjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2013-04-14 12:42:06 +0000
committerjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2013-04-14 12:42:06 +0000
commit6168089ac43664c10ca2dc1281c8648fbf3b35a9 (patch)
tree1ac85698d15ccdf4b70c97fa8b88641c98f236c8 /inst
parent19537674a67c7b52ceb310bd47c0c2c04830ffb8 (diff)
- Update the TODO list, setting some requirements for version 1.0
- Check that initial values specified using parms.ini are actually needed for the model, stop otherwise - List all formation fractions in the same place in the summary, also if they were fitted in the model - Include an FOMC model coupled to two metabolites in the unit tests - Some updates needed because of the above - Update of static documentation including the vignettes - Update of the mkin vignettes in the vignettes directory git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@82 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'inst')
-rw-r--r--inst/unitTests/runit.mkinfit.R39
1 files changed, 8 insertions, 31 deletions
diff --git a/inst/unitTests/runit.mkinfit.R b/inst/unitTests/runit.mkinfit.R
index 784054b8..278560d7 100644
--- a/inst/unitTests/runit.mkinfit.R
+++ b/inst/unitTests/runit.mkinfit.R
@@ -295,42 +295,19 @@ test.mkinfit.schaefer07_complex_example <- function()
checkIdentical(r$mkin.deviation < 10, rep(TRUE, length(r$mkin.deviation)))
} # }}}
-# Test deSolve based fit to Schaefer 2007 data against solution from conference paper {{{
-test.mkinfit.schaefer07_complex_example <- function()
+# Test deSolve based fit to Schaefer 2007 using FOMC for parent (eigenvalue based solution not possible)
+# and skipping B1 because of its high scatter {{{
+test.mkinfit.schaefer07_complex_example_2 <- function()
{
- schaefer07_complex_model <- mkinmod(
- parent = list(type = "SFO", to = c("A1", "B1", "C1"), sink = FALSE),
+ schaefer07_complex_model_2 <- mkinmod(
+ parent = list(type = "FOMC", to = c("A1", "C1")),
A1 = list(type = "SFO", to = "A2"),
- B1 = list(type = "SFO"),
C1 = list(type = "SFO"),
A2 = list(type = "SFO"))
- # Works fine with n.outtimes = 1000 but takes too much time
- # fit <- mkinfit(schaefer07_complex_model,
- # mkin_wide_to_long(schaefer07_complex_case, time = "time"),
- # n.outtimes = 1000, solution_type = "deSolve")
- # s <- summary(fit)
- # r <- schaefer07_complex_results
- # attach(as.list(fit$parms.all))
- # k_parent <- sum(k_parent_A1, k_parent_B1, k_parent_C1)
- # r$mkin <- c(
- # k_parent,
- # s$distimes["parent", "DT50"],
- # s$ff["parent_A1"],
- # sum(k_A1_sink, k_A1_A2),
- # s$distimes["A1", "DT50"],
- # s$ff["parent_B1"],
- # k_B1_sink,
- # s$distimes["B1", "DT50"],
- # s$ff["parent_C1"],
- # k_C1_sink,
- # s$distimes["C1", "DT50"],
- # s$ff["A1_A2"],
- # k_A2_sink,
- # s$distimes["A2", "DT50"])
- # r$means <- (r$KinGUI + r$ModelMaker)/2
- # r$mkin.deviation <- abs(round(100 * ((r$mkin - r$means)/r$means), digits=1))
- # checkIdentical(r$mkin.deviation < 10, rep(TRUE, length(r$mkin.deviation)))
+ fit <- mkinfit(schaefer07_complex_model_2,
+ mkin_wide_to_long(schaefer07_complex_case, time = "time"))
+ checkTrue(fit$ssr < 122)
} # }}}
# vim: set foldmethod=marker ts=2 sw=2 expandtab:

Contact - Imprint