aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/mkinfit.R8
1 files changed, 7 insertions, 1 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index c6b6915c..4c4a9717 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -513,13 +513,19 @@ mkinfit <- function(mkinmod, observed,
data$name <- ordered(data$name, levels = obs_vars)
data <- data[order(data$name, data$time), ]
+ # Add a column named "value" holding the observed values for the case
+ # that this column was selected for manual weighting, so it can be
+ # shown in the summary as "err"
+ data$value <- data$value.x
+
fit$data <- data.frame(time = data$time,
variable = data$name,
observed = data$value.x,
predicted = data$value.y)
+
fit$data$residual <- fit$data$observed - fit$data$predicted
if (!is.null(data$err.ini)) fit$data$err.ini <- data$err.ini
- if (!is.null(err)) fit$data[[err]] <- data[[err]]
+ if (!is.null(err)) fit$data[["err"]] <- data[[err]]
fit$atol <- atol
fit$rtol <- rtol

Contact - Imprint