"plot"(x, fit = x, obs_vars = names(fit$mkinmod$map), xlab = "Time", ylab = "Observed", xlim = range(fit$data$time), ylim = "default", col_obs = 1:length(obs_vars), pch_obs = col_obs, lty_obs = rep(1, length(obs_vars)), add = FALSE, legend = !add, show_residuals = FALSE, maxabs = "auto", sep_obs = FALSE, rel.height.middle = 0.9, lpos = "topright", inset = c(0.05, 0.05), show_errmin = FALSE, errmin_digits = 3, ...) plot_sep(fit, sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE, ...)
mkinfit
.
legend
as the first argument.
If not length one, this should be of the same length as the obs_var argument.
legend
if applicable.
plot
.
Solves the differential equations with the optimised and fixed parameters
from a previous successful call to mkinfit
and plots
the observed data together with the solution of the fitted model.
# One parent compound, one metabolite, both single first order, path from # parent to sink included, use Levenberg-Marquardt for speed SFO_SFO <- mkinmod(parent = mkinsub("SFO", "m1", full = "Parent"), m1 = mkinsub("SFO", full = "Metabolite M1" ))Successfully compiled differential equation model from auto-generated C code.fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE, method.modFit = "Marq") plot(fit)plot(fit, show_residuals = TRUE)# Show the observed variables separately plot(fit, sep_obs = TRUE, lpos = c("topright", "bottomright"))# Show the observed variables separately, with residuals plot(fit, sep_obs = TRUE, show_residuals = TRUE, lpos = c("topright", "bottomright"), show_errmin = TRUE)# The same can be obtained with less typing, using the convenience function plot_sep plot_sep(fit, lpos = c("topright", "bottomright"))