From f0ef23a7598e5d19648ae4edc2b74e0fba27a41c Mon Sep 17 00:00:00 2001
From: Johannes Ranke
mkinpredict( - x, - odeparms, - odeini, - outtimes = seq(0, 120, by = 0.1), - solution_type = "deSolve", - use_compiled = "auto", - method.ode = "lsoda", - atol = 1e-08, - rtol = 1e-10, - map_output = TRUE, - ... -) +mkinpredict(x, odeparms, odeini, outtimes, ...) # S3 method for mkinmod mkinpredict( @@ -177,6 +165,7 @@ kinetic parameters and initial values for the state variables. atol = 1e-08, rtol = 1e-10, map_output = TRUE, + na_stop = TRUE, ... ) @@ -220,6 +209,11 @@ observed variables, for example in the case of the SFORB model.outtimes + + A numeric vector specifying the time points for which model predictions should be generated.
+ ... +Further arguments passed to the ode solver in case such a +solver is used.
solution_type @@ -258,9 +252,8 @@ FALSE). Setting this to FALSE has no effect for analytical solutions, as these always return mapped output.- @@ -273,7 +266,7 @@ solver is used.... -+ Further arguments passed to the ode solver in case such a -solver is used.
na_stop +Should it be an error if deSolve::ode returns NaN values
Examples
-- cgit v1.2.1-SFO <- mkinmod(degradinol = mkinsub("SFO")) +SFO <- mkinmod(degradinol = mkinsub("SFO")) # Compare solution types mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, solution_type = "analytical") @@ -395,7 +388,7 @@ solver is used. # Comparison of the performance of solution types SFO_SFO = mkinmod(parent = list(type = "SFO", to = "m1"), m1 = list(type = "SFO"), use_of_ff = "max") -#>#>if(require(rbenchmark)) { benchmark(replications = 10, order = "relative", columns = c("test", "relative", "elapsed"), eigen = mkinpredict(SFO_SFO, c(k_parent = 0.15, f_parent_to_m1 = 0.5, k_m1 = 0.01), @@ -415,10 +408,10 @@ solver is used. solution_type = "analytical", use_compiled = FALSE)[201,]) }#> test relative elapsed +#> 2 deSolve_compiled 1.0 0.005 #> 4 analytical 1.0 0.005 -#> 2 deSolve_compiled 1.2 0.006 #> 1 eigen 4.0 0.020 -#> 3 deSolve 45.6 0.228+#> 3 deSolve 44.6 0.223# \dontrun{ # Predict from a fitted model f <- mkinfit(SFO_SFO, FOCUS_2006_C, quiet = TRUE) @@ -426,11 +419,11 @@ solver is used. head(mkinpredict(f))#> time parent m1 #> 0 0.0 82.49216 0.000000 -#> 0.1 0.1 80.00562 1.236198 -#> 0.2 0.2 77.59404 2.422818 -#> 0.3 0.3 75.25514 3.561476 -#> 0.4 0.4 72.98675 4.653740 -#> 0.5 0.5 70.78673 5.701130# } +#> 0.1 0.1 80.00562 1.236394 +#> 0.2 0.2 77.59404 2.423201 +#> 0.3 0.3 75.25514 3.562040 +#> 0.4 0.4 72.98675 4.654478 +#> 0.5 0.5 70.78673 5.702033# }