diff options
author | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2012-03-15 15:54:14 +0000 |
---|---|---|
committer | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2012-03-15 15:54:14 +0000 |
commit | 3a6b9f52c74d6ef88a8d32c50e42864b3f251719 (patch) | |
tree | c80ebe6187fc88e77dd17da09135a168744ea23f | |
parent | b9f180f177c2aca5d3a33e850b4fb0c51053bf2f (diff) |
Update kinfit and mkin to the latest version published on BerliOS.
git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/kinfit@17 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
46 files changed, 2164 insertions, 276 deletions
diff --git a/DESCRIPTION b/DESCRIPTION index 11dced9..622a9a0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,16 @@ Package: kinfit
Type: Package
Title: Routines for fitting kinetic models to chemical degradation data
-Version: 1.0.2
-Date: 2010-05-20
-Author: Johannes Ranke
-Maintainer: Johannes Ranke <jranke@harlan.com>
+Version: 1.1.06
+Date: 2011-11-09
+Author: Johannes Ranke and Katrin Lindenberger
+Maintainer: Johannes Ranke <jranke@users.berlios.de>
Description: Simple calculation routines based on the FOCUS Kinetics
- Report (2006)
+ Report (2006). Only kinetic models for parent only datasets are
+ included (no metabolite formation/decline or multicompartment kinetics).
+ Please note that no warranty is implied for correctness of results or
+ fitness for a particular purpose.
License: GPL
LazyLoad: yes
+LazyData: yes
+URL: http://cran.r-project.org, http://developer.berlios.de/projects/mkin/
diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 0000000..cd24e63 --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,5 @@ +# Default NAMESPACE created by R
+# Remove the previous line if you edit this file
+
+# Export all names
+exportPattern(".")
diff --git a/R/kinerrmin.R b/R/kinerrmin.R index 8ce30a3..dbd64b3 100644 --- a/R/kinerrmin.R +++ b/R/kinerrmin.R @@ -1,3 +1,23 @@ +# $Id: kinerrmin.R 59 2010-07-28 12:29:15Z jranke $
+
+# Copyright (C) 2008-2010 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
kinerrmin <- function(kinfits, kinmodel = "SFO", alpha = 0.05)
{
m = kinfits[[kinmodel]]
@@ -1,43 +1,76 @@ +# $Id: kinfit.R 116 2011-06-14 08:46:47Z kati $
+
+# Copyright (C) 2008-2010 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
kinfit <- function(kindata, kinmodels = c("SFO"),
parent.0.user = NA,
+ parent.0.fixed = FALSE,
start.SFO = list(parent.0 = NA, k = NA),
start.FOMC = list(parent.0 = NA, alpha = NA, beta = NA),
start.DFOP = list(parent.0 = NA, k1 = NA, k2 = NA, g = NA),
start.HS = list(parent.0 = NA, k1 = NA, k2 = NA, tb = NA),
- algorithm = "port")
+ algorithm = "default")
{
+
kindata <- subset(kindata, !is.na(kindata$parent))
kinfits <- list()
if (!is.na(parent.0.user)) {
start.SFO$parent.0 = parent.0.user
start.FOMC$parent.0 = parent.0.user
+ start.DFOP$parent.0 = parent.0.user
+ start.HS$parent.0 = parent.0.user
}
lmlogged = lm(log(parent) ~ t, data = kindata)
+ k.est = -coef(lmlogged)[["t"]]
for (kinmodel in kinmodels)
{
if (kinmodel == "SFO") {
if (is.na(start.SFO$parent.0)) {
- start.SFO$parent.0 = max(kindata$parent)
+ start.SFO$parent.0 = max(kindata$parent)
}
if (is.na(start.SFO$k)) {
start.SFO$k = - coef(lmlogged)[["t"]]
}
- kinfits[[kinmodel]] = try(
- nls(parent ~ SFO(t, parent.0, k),
- data = kindata, model = TRUE,
- start = start.SFO,
- algorithm = algorithm), silent=TRUE)
+ if (parent.0.fixed)
+ {
+ start.SFO = start.SFO[-1]
+ kinfits[[kinmodel]] = try(
+ nls(parent ~ SFO(t, parent.0.user, k),
+ data = kindata, model = TRUE,
+ start = start.SFO,
+ algorithm = algorithm), silent=TRUE)
+ } else {
+ kinfits[[kinmodel]] = try(
+ nls(parent ~ SFO(t, parent.0, k),
+ data = kindata, model = TRUE,
+ start = start.SFO,
+ algorithm = algorithm), silent=TRUE)
+ }
+ k.est = coef(kinfits$SFO)[["k"]]
}
- k.est = ifelse(is.na(coef(kinfits$SFO)[["k"]]),
- -coef(lmlogged)[["t"]],
- coef(kinfits$SFO)[["k"]])
if (kinmodel == "FOMC") {
if (is.na(start.FOMC$parent.0)) {
- start.FOMC$parent.0 = max(kindata$parent)
+ start.FOMC$parent.0 = max(kindata$parent)
}
if (is.na(start.FOMC$alpha)) {
start.FOMC$alpha = 1
@@ -45,15 +78,29 @@ kinfit <- function(kindata, kinmodels = c("SFO"), if (is.na(start.FOMC$beta)) {
start.FOMC$beta = start.FOMC$alpha / k.est
}
- kinfits[[kinmodel]] = try(
- nls(parent ~ FOMC(t, parent.0, alpha, beta),
- data = kindata, model = TRUE,
- start = start.FOMC,
- algorithm = algorithm), silent=TRUE)
+
+ if (parent.0.fixed)
+ {
+ start.FOMC = list(alpha = start.FOMC$alpha, beta = start.FOMC$beta)
+
+ kinfits[[kinmodel]] = try(
+ nls(parent ~ FOMC(t, parent.0.user, alpha, beta),
+ data = kindata, model = TRUE,
+ start = start.FOMC,
+ algorithm = algorithm), silent=TRUE)
+
+ } else {
+ kinfits[[kinmodel]] = try(
+ nls(parent ~ FOMC(t, parent.0, alpha, beta),
+ data = kindata, model = TRUE,
+ start = start.FOMC,
+ algorithm = algorithm), silent=TRUE)
+
+ }
}
if (kinmodel == "DFOP") {
if (is.na(start.DFOP$parent.0)) {
- start.DFOP$parent.0 = max(kindata$parent)
+ start.DFOP$parent.0 = max(kindata$parent)
}
if (is.na(start.DFOP$k1)) {
start.DFOP$k1 = k.est * 2
@@ -64,15 +111,26 @@ kinfit <- function(kindata, kinmodels = c("SFO"), if (is.na(start.DFOP$g)) {
start.DFOP$g = 0.5
}
- kinfits[[kinmodel]] = try(
+ if (parent.0.fixed)
+ {
+ start.DFOP = list(k1 = start.DFOP$k1, k2 = start.DFOP$k2, g = start.DFOP$g)
+
+ kinfits[[kinmodel]] = try(
+ nls(parent ~ DFOP(t, parent.0.user, k1, k2, g),
+ data = kindata, model = TRUE,
+ start = start.DFOP,
+ algorithm = algorithm), silent=TRUE)
+ }else{
+ kinfits[[kinmodel]] = try(
nls(parent ~ DFOP(t, parent.0, k1, k2, g),
data = kindata, model = TRUE,
start = start.DFOP,
- algorithm = algorithm), silent=TRUE)
+ algorithm = algorithm), silent=TRUE)
+ }
}
if (kinmodel == "HS") {
if (is.na(start.HS$parent.0)) {
- start.HS$parent.0 = max(kindata$parent)
+ start.HS$parent.0 = max(kindata$parent)
}
if (is.na(start.HS$k1)) {
start.HS$k1 = k.est
@@ -83,11 +141,24 @@ kinfit <- function(kindata, kinmodels = c("SFO"), if (is.na(start.HS$tb)) {
start.HS$tb = 0.05 * max(kindata$t)
}
- kinfits[[kinmodel]] = try(
+
+ if (parent.0.fixed)
+ {
+
+ start.HS = list(k1 = start.HS$k1, k2 = start.HS$k2, tb = start.HS$tb)
+
+ kinfits[[kinmodel]] = try(
+ nls(parent ~ HS(t, parent.0.user, k1, k2, tb),
+ data = kindata, model = TRUE,
+ start = start.HS,
+ algorithm = algorithm), silent=TRUE)
+ }else{
+ kinfits[[kinmodel]] = try(
nls(parent ~ HS(t, parent.0, k1, k2, tb),
data = kindata, model = TRUE,
start = start.HS,
- algorithm = algorithm), silent=TRUE)
+ algorithm = algorithm), silent=TRUE)
+ }
}
}
return(kinfits)
diff --git a/R/kinobject.R b/R/kinobject.R index de6f6af..2ecc962 100644 --- a/R/kinobject.R +++ b/R/kinobject.R @@ -1,3 +1,23 @@ +# $Id: kinobject.R 59 2010-07-28 12:29:15Z jranke $
+
+# Copyright (C) 2008-2010 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
kinobject <- function(parent, type, system,
layers = NA, sampling_times = NA)
{
diff --git a/R/kinobjects.R b/R/kinobjects.R index a767cea..33abe61 100644 --- a/R/kinobjects.R +++ b/R/kinobjects.R @@ -1,3 +1,23 @@ +# $Id: kinobjects.R 59 2010-07-28 12:29:15Z jranke $
+
+# Copyright (C) 2008-2010 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
kinobjects<- function(parent, type, systems,
layers = NA, sampling_times = NA)
{
diff --git a/R/kinplot.R b/R/kinplot.R index ace1270..394e271 100644 --- a/R/kinplot.R +++ b/R/kinplot.R @@ -1,61 +1,113 @@ +# $Id: kinplot.R 117 2011-06-14 08:52:14Z kati $
+
+# Copyright (C) 2008-2010 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
kinplot <- function(kinobject,
+ main = "",
xlab = "Time [days]", ylab = "Parent [% of applied radioactivity]",
ylim = c("auto", "auto"),
lpos = "topright")
{
kindata <- na.omit(kinobject$data)
kinfits <- kinobject$fits
- if (ylim[1] == "auto") ylim[1] <- 0
- if (ylim[2] == "auto") ylim[2] <- max(kindata$parent)
- ylim <- as.numeric(ylim)
+ if (ylim[1] == "auto") ylim[1] <- 0
+ if (ylim[2] == "auto") ylim[2] <- max(kindata$parent)
+ ylim <- as.numeric(ylim)
plot(kindata$t, kindata$parent,
+ main = main,
xlab = xlab,
ylab = ylab,
ylim = ylim
- )
+ )
n.m <- length(kinfits)
colors <- ltys <- 1:n.m
names(colors) <- names(ltys) <- names(kinfits)
- ltext <- paste(kinobject$parent, "measured")
+ ltext <- paste(kinobject$parent, "measured")
for (kinmodel in names(kinfits))
{
m = kinfits[[kinmodel]]
if(class(m) == "nls") {
- switch(kinmodel,
- SFO = curve(SFO(x,
- coef(m)[["parent.0"]],
- coef(m)[["k"]]),
- from = min(kindata$t), to = max(kindata$t), add=TRUE,
- col = colors[[kinmodel]],
- lty = ltys[[kinmodel]]),
- FOMC = curve(FOMC(x,
- coef(m)[["parent.0"]],
- coef(m)[["alpha"]],
- coef(m)[["beta"]]),
- from = min(kindata$t), to = max(kindata$t), add=TRUE,
- col = colors[[kinmodel]],
- lty = ltys[[kinmodel]]),
- HS = curve(HS(x,
- coef(m)[["parent.0"]],
- coef(m)[["k1"]],
- coef(m)[["k2"]],
- coef(m)[["tb"]]),
- from = min(kindata$t), to = max(kindata$t), add=TRUE,
- col = colors[[kinmodel]],
- lty = ltys[[kinmodel]]),
- DFOP = curve(DFOP(x,
- coef(m)[["parent.0"]],
- coef(m)[["k1"]],
- coef(m)[["k2"]],
- coef(m)[["g"]]),
- from = min(kindata$t), to = max(kindata$t), add=TRUE,
- col = colors[[kinmodel]],
- lty = ltys[[kinmodel]]))
- ltext <- c(ltext, paste("Fitted", kinmodel, "model"))
+ if (!"parent.0" %in% names(coef(m))) {
+ switch(kinmodel,
+ SFO = lines(
+ t <- seq(min(kindata$t), max(kindata$t), length.out=500),
+ predict(m,
+ newdata = data.frame(t)),
+ col = colors[[kinmodel]],
+ lty = ltys[[kinmodel]]),
+ FOMC = lines(
+ t <- seq(min(kindata$t), max(kindata$t), length.out=500),
+ predict(m,
+ newdata = data.frame(t)),
+ col = colors[[kinmodel]],
+ lty = ltys[[kinmodel]]),
+ HS = lines(
+ t <- seq(min(kindata$t), max(kindata$t), length.out=500),
+ predict(m,
+ newdata = data.frame(t)),
+ col = colors[[kinmodel]],
+ lty = ltys[[kinmodel]]),
+ DFOP = lines(
+ t <- seq(min(kindata$t), max(kindata$t), length.out=500),
+ predict(m,
+ newdata = data.frame(t)),
+ col = colors[[kinmodel]],
+ lty = ltys[[kinmodel]])
+ )
+ ltext <- c(ltext, paste("Fitted", kinmodel, "model"))
+ } else {
+ switch(kinmodel,
+ SFO = curve(SFO(x,
+ coef(m)[["parent.0"]],
+ coef(m)[["k"]]),
+ from = min(kindata$t), to = max(kindata$t), add=TRUE,
+ col = colors[[kinmodel]],
+ lty = ltys[[kinmodel]]),
+ FOMC = curve(FOMC(x,
+ coef(m)[["parent.0"]],
+ coef(m)[["alpha"]],
+ coef(m)[["beta"]]),
+ from = min(kindata$t), to = max(kindata$t), add=TRUE,
+ col = colors[[kinmodel]],
+ lty = ltys[[kinmodel]]),
+ HS = curve(HS(x,
+ coef(m)[["parent.0"]],
+ coef(m)[["k1"]],
+ coef(m)[["k2"]],
+ coef(m)[["tb"]]),
+ from = min(kindata$t), to = max(kindata$t), add=TRUE,
+ col = colors[[kinmodel]],
+ lty = ltys[[kinmodel]]),
+ DFOP = curve(DFOP(x,
+ coef(m)[["parent.0"]],
+ coef(m)[["k1"]],
+ coef(m)[["k2"]],
+ coef(m)[["g"]]),
+ from = min(kindata$t), to = max(kindata$t), add=TRUE,
+ col = colors[[kinmodel]],
+ lty = ltys[[kinmodel]]))
+ ltext <- c(ltext, paste("Fitted", kinmodel, "model"))
+ }
} else {
- ltext <- c(ltext, paste(kinmodel, "model failed"))
- ltys[[kinmodel]] <- NA
+ ltext <- c(ltext, paste(kinmodel, "model failed"))
+ ltys[[kinmodel]] <- NA
}
}
legend(lpos, bty="n", inset = 0.05,
diff --git a/R/kinreport.R b/R/kinreport.R index 4156803..d405b8e 100644 --- a/R/kinreport.R +++ b/R/kinreport.R @@ -1,43 +1,86 @@ -kinreport <- function(kinobject, file = NA, vcov = FALSE, endpoint.digits = 1)
+# $Id: kinreport.R 123 2011-11-01 12:26:41Z jranke $
+
+# Copyright (C) 2008-2010 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
+kinreport <- function(kinobject, file = NA, data = TRUE, R2 = FALSE, vcov = FALSE, endpoint.digits = 1)
{
if (!is.na(file)) {
sink(file, split=TRUE)
}
cat("Parent compound: ", kinobject$parent, "\n")
- if (!is.null(kinobject$label)) cat("Label position:\t\t", kinobject$label, "\n")
+ if (!is.null(kinobject$label)) {
+ cat("Label position:\t\t", kinobject$label, "\n")
+ }
cat("Study type: ", kinobject$type, "\n")
cat("System: ", kinobject$system, "\n")
if (!is.null(kinobject$source)) {
- cat("Source: ", kinobject$source, "\n")
- }
+ cat("Source: ", kinobject$source, "\n")
+ }
+ cat("kinfit version: ", as.character(packageVersion("kinfit")), "\n")
+ cat("R version: ", paste(R.version$major, R.version$minor, sep="."), "\n")
+ cat("Report generated:", date(), "\n")
cat("\n")
+ if (data) {
+ cat("Data:\n")
+ print(kinobject$data)
+ cat("\n")
+ }
fit.names <- names(kinobject$fits)
for (kinmodel in fit.names)
{
- m <- kinobject$fits[[kinmodel]]
- if (!(class(m) == "try-error")) {
- cat("\n\n---\n")
- cat("Nonlinear least squares fit of the", kinmodel, "model\n\n")
- cat("Parameter estimation:\t")
- s <- summary(m)
- df <- s$df[2]
- p <- 1 - pt(s$parameters[,3], df = df)
- parms <- cbind(s$parameters[,c(1,2,3)], "Pr(>t)" = p)
- cat("\n")
- print(parms, digits=3)
- cat("\n")
- if(vcov)
- {
- cat("Variance-covariance matrix:\n")
- print(vcov(m))
- cat("\n")
- }
- cat("Chi2 error estimation:\t",
- round(100 * kinobject$results$stats[kinmodel, "err.min"], digits=2),
- " %\n", sep="")
- cat("\n")
- }
+ m <- kinobject$fits[[kinmodel]]
+ if (!(class(m) == "try-error")) {
+ cat("\n\n---\n")
+ cat("Nonlinear least squares fit of the", kinmodel, "model\n")
+ if (!"parent.0" %in% names(coef(m))) {
+ cat(paste("Initial value of parent fixed to ", m$model$parent.0.user, "\n", sep=""))
+ }
+ cat("\n")
+ cat("Parameter estimation:\t")
+ s <- summary(m)
+ df <- s$df[2]
+ p <- 1 - pt(s$parameters[,3], df = df)
+ parms <- matrix(nrow = nrow(s$parameters), ncol=4)
+ dimnames(parms) = list(rownames(s$parameters),
+ c("Estimate", "Std. Error", "t value", "Pr(>t)"))
+ parms[, c(1,2,3)] <- s$parameters[,c(1,2,3)]
+ parms[, 4] <- p
+ cat("\n")
+ print(parms, digits=3)
+ cat("\n")
+ if(vcov)
+ {
+ cat("Variance-covariance matrix:\n")
+ print(vcov(m))
+ cat("\n")
+ }
+ cat("Chi2 error estimation: ",
+ round(100 * kinobject$results$stats[kinmodel, "err.min"], digits=2),
+ " %\n", sep="")
+ cat("\n")
+ if(R2)
+ {
+ cat("Coefficient of determination R2: ",
+ round(kinobject$results$stats[kinmodel, "R2"], digits=3), "\n")
+ }
+ }
}
cat("\n\n---\n")
cat("Endpoint estimates\n\n")
diff --git a/R/kinresplot.R b/R/kinresplot.R index be0a85d..36eb55a 100644 --- a/R/kinresplot.R +++ b/R/kinresplot.R @@ -1,3 +1,23 @@ +# $Id: kinresplot.R 106 2011-05-12 10:55:37Z jranke $
+
+# Copyright (C) 2008-2010 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
kinresplot <- function(kinobject, kinmodel,
xlab = "Time [days]", ylab = "Residual [% of applied radioactivity]",
maxabs = "auto")
@@ -5,10 +25,11 @@ kinresplot <- function(kinobject, kinmodel, m <- kinobject$fits[[kinmodel]]
t <- m$model$t
residuals <- residuals(m)
- if (maxabs == "auto") maxabs = max(abs(residuals))
+ if (maxabs == "auto") maxabs = max(abs(residuals), na.rm = TRUE)
plot(t, residuals,
xlab = xlab,
ylab = ylab,
ylim = c( -1.2 * maxabs, 1.2 * maxabs))
+ abline(h=0, lty=2)
title(paste("Residuals of", kinmodel, "fit"), font.main = 1)
}
diff --git a/R/kinresults.R b/R/kinresults.R index 6bbff28..27bdafb 100644 --- a/R/kinresults.R +++ b/R/kinresults.R @@ -1,74 +1,145 @@ -kinresults <- function(kinfits, alpha = 0.05, SFORB=TRUE)
+# $Id: kinresults.R 124 2011-11-09 10:58:27Z jranke $
+
+# Copyright (C) 2008-2011 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
+kinresults <- function(kinfits, alpha = 0.05, DTmax = 1000, SFORB=TRUE)
{
- kindata <- data.frame(t = kinfits[[1]]$model$t, parent = kinfits[[1]]$model$parent)
- kindata.means <- aggregate(kindata, list(kindata$t), mean)
+ kindata <- data.frame(
+ t = kinfits[[1]]$model$t,
+ parent = kinfits[[1]]$model$parent)
+ kindata.means <- aggregate(kindata, list(kindata$t), mean)
kindata.means.mean <- mean(kindata.means$parent, na.rm=TRUE)
n.times <- length(kindata.means$parent)
parms <- list()
- df <- err.min <- RSS <- vector()
+ df <- err.min <- R2 <- RSS <- TSS <- RSS.means <- TSS.means <- vector()
DT50 <- DT90 <- vector()
f <- list()
+
for (kinmodel in names(kinfits))
{
m = kinfits[[kinmodel]]
if(class(m) == "nls") {
kindata.means$est <- predict(m, kindata.means)
- parms[[kinmodel]] <- switch(kinmodel,
- SFO = list(parent.0 = coef(m)[["parent.0"]],
- k = coef(m)[["k"]]),
- FOMC = list(parent.0 = coef(m)[["parent.0"]],
- alpha = coef(m)[["alpha"]],
- beta = coef(m)[["beta"]]),
- HS = list(parent.0 = coef(m)[["parent.0"]],
- k1 = coef(m)[["k1"]],
- k2 = coef(m)[["k2"]],
- tb = coef(m)[["tb"]]),
- DFOP = list(parent.0 = coef(m)[["parent.0"]],
- k1 = coef(m)[["k1"]],
- k2 = coef(m)[["k2"]],
- g = coef(m)[["g"]]))
- if(kinmodel == "DFOP" & SFORB) {
- k1 = coef(m)[["k1"]]
- k2 = coef(m)[["k2"]]
- g = coef(m)[["g"]]
- parms[["SFORB"]] =
- list(parent.0 = coef(m)[["parent.0"]],
- k1out = g * k1 + (1 - g) * k2,
- k21 = k1 * k2 / (g * k1 + (1 - g) * k2),
- k12 = (g * (1 - g) * (k1 - k2)^2) / (g * k1 + (1 - g) * k2))
+
+ if (!"parent.0" %in% names(coef(m))) {
+
+ parms[[kinmodel]] <- switch(kinmodel,
+ SFO = list(k = coef(m)[["k"]]),
+ FOMC = list(alpha = coef(m)[["alpha"]],
+ beta = coef(m)[["beta"]]),
+ HS = list(k1 = coef(m)[["k1"]],
+ k2 = coef(m)[["k2"]],
+ tb = coef(m)[["tb"]]),
+ DFOP= list(k1 = coef(m)[["k1"]],
+ k2 = coef(m)[["k2"]],
+ g = coef(m)[["g"]]))
+ } else {
+ parms[[kinmodel]] <- switch(kinmodel,
+ SFO = list(parent.0 = coef(m)[["parent.0"]],
+ k = coef(m)[["k"]]),
+ FOMC = list(parent.0 = coef(m)[["parent.0"]],
+ alpha = coef(m)[["alpha"]],
+ beta = coef(m)[["beta"]]),
+ HS = list(parent.0 = coef(m)[["parent.0"]],
+ k1 = coef(m)[["k1"]],
+ k2 = coef(m)[["k2"]],
+ tb = coef(m)[["tb"]]),
+ DFOP = list(parent.0 = coef(m)[["parent.0"]],
+ k1 = coef(m)[["k1"]],
+ k2 = coef(m)[["k2"]],
+ g = coef(m)[["g"]]))
+ if(kinmodel == "DFOP" & SFORB) {
+ k1 = coef(m)[["k1"]]
+ k2 = coef(m)[["k2"]]
+ g = coef(m)[["g"]]
+ parms[["SFORB"]] =
+ list(parent.0 = coef(m)[["parent.0"]],
+ k1out = g * k1 + (1 - g) * k2,
+ k21 = k1 * k2 / (g * k1 + (1 - g) * k2),
+ k12 = (g * (1 - g) * (k1 - k2)^2) / (g * k1 + (1 - g) * k2))
+ }
+ }
+
+ n.parms = length(coef(m))
+ if (!"parent.0" %in% names(coef(m))) {
+
+ f[[kinmodel]] = switch(kinmodel,
+ HS = function(t, x) {
+ (HS(t, kinfits[[kinmodel]]$model[["parent.0.user"]],
+ coef(m)[["k1"]], coef(m)[["k2"]], coef(m)[["tb"]]) -
+ (1 - x/100) * kinfits[[kinmodel]]$model[["parent.0.user"]])^2
+ },
+ DFOP = function(t, x) {
+ (DFOP(t, kinfits[[kinmodel]]$model[["parent.0.user"]],
+ coef(m)[["k1"]], coef(m)[["k2"]], coef(m)[["g"]]) -
+ (1 - x/100) * kinfits[[kinmodel]]$model[["parent.0.user"]])^2
+ }
+ )
+ }else{
+ f[[kinmodel]] = switch(kinmodel,
+ HS = function(t, x) {
+ (HS(t, coef(m)[["parent.0"]],
+ coef(m)[["k1"]], coef(m)[["k2"]], coef(m)[["tb"]]) -
+ (1 - x/100) * coef(m)[["parent.0"]])^2
+ },
+ DFOP = function(t, x) {
+ (DFOP(t, coef(m)[["parent.0"]],
+ coef(m)[["k1"]], coef(m)[["k2"]], coef(m)[["g"]]) -
+ (1 - x/100) * coef(m)[["parent.0"]])^2
+ }
+ )
}
- n.parms = length(coef(m))
- f[[kinmodel]] = switch(kinmodel,
- HS = function(t, x) {
- (HS(t, coef(m)[["parent.0"]],
- coef(m)[["k1"]], coef(m)[["k2"]], coef(m)[["tb"]]) -
- (1 - x/100) * coef(m)[["parent.0"]])^2
- },
- DFOP = function(t, x) {
- (DFOP(t, coef(m)[["parent.0"]],
- coef(m)[["k1"]], coef(m)[["k2"]], coef(m)[["g"]]) -
- (1 - x/100) * coef(m)[["parent.0"]])^2
- }
- )
+
coef(m)
df[[kinmodel]] = n.times - n.parms
RSS[[kinmodel]] = sum(summary(m)$residuals^2)
- DT50[[kinmodel]] = switch(kinmodel,
- SFO = log(2)/coef(m)[["k"]],
+ TSS[[kinmodel]] = sum((m$model$parent - mean(m$model$parent))^2)
+
+ DT50.o = switch(kinmodel,
+ SFO = log(2)/coef(m)[["k"]],
FOMC = coef(m)[["beta"]] * (2^(1/coef(m)[["alpha"]]) - 1),
- HS = optimize(f[[kinmodel]], c(0, max(kindata$t)), x=50)$minimum,
- DFOP = optimize(f[[kinmodel]], c(0, max(kindata$t)), x=50)$minimum)
- DT90[[kinmodel]] = switch(kinmodel,
- SFO = log(10)/coef(m)[["k"]],
- FOMC = coef(m)[["beta"]] * (10^(1/coef(m)[["alpha"]]) - 1),
- HS = optimize(f[[kinmodel]], c(0, max(kindata$t)), x=90)$minimum,
- DFOP = optimize(f[[kinmodel]], c(0, max(kindata$t)), x=90)$minimum)
- err.min[[kinmodel]] <- kinerrmin(kinfits, kinmodel)
+ HS = optimize(f[[kinmodel]], c(0, DTmax), x=50)$minimum,
+ DFOP = optimize(f[[kinmodel]], c(0, DTmax), x=50)$minimum)
+
+
+ DT50[[kinmodel]] = ifelse(abs(DT50.o - DTmax) < 0.1, NA, DT50.o)
+ DT90.o = switch(kinmodel,
+ SFO = log(10)/coef(m)[["k"]],
+ FOMC = coef(m)[["beta"]] * (10^(1/coef(m)[["alpha"]]) - 1),
+ HS = optimize(f[[kinmodel]], c(0, DTmax), x=90)$minimum,
+ DFOP = optimize(f[[kinmodel]], c(0, DTmax), x=90)$minimum)
+ DT90[[kinmodel]] = ifelse(abs(DT90.o - DTmax) < 0.1, NA, DT90.o)
+
+ # Chi2 error level as defined in FOCUS kinetics (see ?kinerrmin)
+ err.min[[kinmodel]] <- kinerrmin(kinfits, kinmodel)
+
+ # Coefficient of determination calculated from residual sum of squares and totals sum of squares
+ # so this r2 is what is called model efficiency in FOCUS kinetics (2006), p. 99
+ R2[[kinmodel]] = 1 - RSS[[kinmodel]]/TSS[[kinmodel]]
+
}
}
- stats <- data.frame(n.times = n.times, df = df, mean.means = kindata.means.mean,
- RSS = RSS, err.min = err.min)
+
+ stats <- data.frame(n.times = n.times, df = df,
+ mean.means = kindata.means.mean,
+ RSS = RSS, err.min = err.min, R2 = R2)
results <- data.frame(DT50 = DT50, DT90 = DT90)
list(parms = parms, stats = stats, results = results)
}
diff --git a/R/kinwrite.KinGUI.R b/R/kinwrite.KinGUI.R index bf94f49..2445685 100644 --- a/R/kinwrite.KinGUI.R +++ b/R/kinwrite.KinGUI.R @@ -1,3 +1,23 @@ +# $Id: kinwrite.KinGUI.R 59 2010-07-28 12:29:15Z jranke $
+
+# Copyright (C) 2008-2010 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
kinwrite.KinGUI <- function(kinobject, file, comment=NA)
{
sink(file)
diff --git a/inst/doc/KinGUI/A_DFOP_report_detailed.txt b/inst/doc/KinGUI/A_DFOP_report_detailed.txt new file mode 100644 index 0000000..242c1e7 --- /dev/null +++ b/inst/doc/KinGUI/A_DFOP_report_detailed.txt @@ -0,0 +1,86 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\A_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k1: 0.1000 0.0000 Inf
+ Parent_k2: 0.0100 0.0000 Inf
+ Parent_g: 0.5000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 8 0 8
+ Number of parameters: 4 0 4
+ Degrees of Freedom: 4 0 4
+
+ Parent Sink All
+
+ RMSE: 7.4470 NaN 7.4470
+ Chi2Sigma: 4.8354 NaN 4.8354
+ Chi2Err%: 9.6603 NaN 9.6603
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 4
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k1 0.0371<-1000.0000 >1000.0000 799.1761 0.5000
+ Parent_k2 0.0372<-1000.0000 >1000.0000 736.5327 0.5000
+ Parent_g 0.4787<-1000.0000 >1000.0000 >1000.0000 0.5000
+ Parent_FFS 1.0000
+ Parent_M(0) 109.0548 91.3583 126.7513 6.3738
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 18.6534 NaN
+ DT90: 61.9654 NaN
+ Kinetic model: dfop sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9845 NaN 0.9845
+ R-square: 0.9857 NaN 0.9857
+
+# Correlation matrix of parameters
+ Parent_k1 Parent_k2 Parent_g Parent_M
+ Parent_k1 1.0000 1.0000 1.0000 0.3572
+ Parent_k2 1.0000 1.0000 1.0000 0.3605
+ Parent_g 1.0000 1.0000 1.0000 0.3588
+ Parent_M 0.3572 0.3605 0.3588 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 101.2400 109.0548 -7.8148 NaN 0.0000 NaN
+ 3.0 99.2700 97.5507 1.7193 NaN 11.5041 NaN
+ 7.0 90.1100 84.0772 6.0328 NaN 24.9776 NaN
+ 14.0 72.1900 64.8204 7.3696 NaN 44.2344 NaN
+ 30.0 29.7100 35.7686 -6.0586 NaN 73.2862 NaN
+ 62.0 5.9800 10.8915 -4.9115 NaN 98.1634 NaN
+ 90.0 1.5400 3.8479 -2.3079 NaN 105.2069 NaN
+ 118.0 0.3900 1.3594 -0.9694 NaN 107.6954 NaN
+
diff --git a/inst/doc/KinGUI/A_FOMC_report_detailed.txt b/inst/doc/KinGUI/A_FOMC_report_detailed.txt new file mode 100644 index 0000000..2b14a22 --- /dev/null +++ b/inst/doc/KinGUI/A_FOMC_report_detailed.txt @@ -0,0 +1,83 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\A_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_alpha: 1.0000 0.0000 Inf
+ Parent_beta: 10.0000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 8 0 8
+ Number of parameters: 3 0 3
+ Degrees of Freedom: 5 0 5
+
+ Parent Sink All
+
+ RMSE: 6.9610 NaN 6.9610
+ Chi2Sigma: 4.6781 NaN 4.6781
+ Chi2Err%: 9.3462 NaN 9.3462
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 5
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_alpha 26.0717 -467.3094 519.4528 191.9336 0.4486
+ Parent_beta 682.1168<-1000.0000 >1000.0000 >1000.0000 0.4500
+ Parent_FFS 1.0000
+ Parent_M(0) 109.4699 95.0742 123.8656 5.6002
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 18.3781 NaN
+ DT90: 62.9832 NaN
+ Kinetic model: fomc sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9831 NaN 0.9831
+ R-square: 0.9845 NaN 0.9845
+
+# Correlation matrix of parameters
+ Parent_alpha Parent_beta Parent_M
+ Parent_alpha 1.0000 0.9998 -0.4272
+ Parent_beta 0.9998 1.0000 -0.4364
+ Parent_M -0.4272 -0.4364 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 101.2400 109.4699 -8.2299 NaN 0.0000 NaN
+ 3.0 99.2700 97.6350 1.6350 NaN 11.8349 NaN
+ 7.0 90.1100 83.8862 6.2238 NaN 25.5837 NaN
+ 14.0 72.1900 64.4547 7.7353 NaN 45.0152 NaN
+ 30.0 29.7100 35.6410 -5.9310 NaN 73.8288 NaN
+ 62.0 5.9800 11.3304 -5.3504 NaN 98.1395 NaN
+ 90.0 1.5400 4.3252 -2.7852 NaN 105.1447 NaN
+ 118.0 0.3900 1.7087 -1.3187 NaN 107.7612 NaN
+
diff --git a/inst/doc/KinGUI/A_HS_report_detailed.txt b/inst/doc/KinGUI/A_HS_report_detailed.txt new file mode 100644 index 0000000..9cc5aee --- /dev/null +++ b/inst/doc/KinGUI/A_HS_report_detailed.txt @@ -0,0 +1,86 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\A_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k1: 0.1000 0.0000 Inf
+ Parent_k2: 0.0100 0.0000 Inf
+ Parent_tb: 3.0000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 8 0 8
+ Number of parameters: 4 0 4
+ Degrees of Freedom: 4 0 4
+
+ Parent Sink All
+
+ RMSE: 3.1728 NaN 3.1728
+ Chi2Sigma: 2.0601 NaN 2.0601
+ Chi2Err%: 4.1158 NaN 4.1158
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 4
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k1 0.0049 -0.0365 0.0464 0.0149 0.3785
+ Parent_k2 0.0461 0.0357 0.0565 0.0037 1.2e-004
+ Parent_tb 5.7617 -0.4681 11.9916 2.2438 0.0311
+ Parent_FFS 1.0000
+ Parent_M(0) 100.9820 92.1729 109.7910 3.1728
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 20.1783 NaN
+ DT90: 55.0878 NaN
+ Kinetic model: hs sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9972 NaN 0.9972
+ R-square: 0.9973 NaN 0.9973
+
+# Correlation matrix of parameters
+ Parent_k1 Parent_k2 Parent_tb Parent_M
+ Parent_k1 1.0000 0.0024 0.8460 0.7018
+ Parent_k2 0.0024 1.0000 0.2691 0.0013
+ Parent_tb 0.8460 0.2691 1.0000 0.3820
+ Parent_M 0.7018 0.0013 0.3820 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 101.2400 100.9820 0.2580 NaN 0.0000 NaN
+ 3.0 99.2700 99.4947 -0.2247 NaN 1.4873 NaN
+ 7.0 90.1100 92.6989 -2.5889 NaN 8.2831 NaN
+ 14.0 72.1900 67.1302 5.0598 NaN 33.8518 NaN
+ 30.0 29.7100 32.1041 -2.3941 NaN 68.8779 NaN
+ 62.0 5.9800 7.3425 -1.3625 NaN 93.6394 NaN
+ 90.0 1.5400 2.0194 -0.4794 NaN 98.9626 NaN
+ 118.0 0.3900 0.5554 -0.1654 NaN 100.4266 NaN
+
diff --git a/inst/doc/KinGUI/A_KinGUI.txt b/inst/doc/KinGUI/A_KinGUI.txt index f42b72c..419b0dc 100644 --- a/inst/doc/KinGUI/A_KinGUI.txt +++ b/inst/doc/KinGUI/A_KinGUI.txt @@ -1,13 +1,13 @@ -Version: 1.1 -Project: -Testsystem: -Comment: NA -t parent -0 101.24 -3 99.27 -7 90.11 -14 72.19 -30 29.71 -62 5.98 -90 1.54 -118 0.39 +Version: 1.1
+Project:
+Testsystem:
+Comment: NA
+t parent
+0 101.24
+3 99.27
+7 90.11
+14 72.19
+30 29.71
+62 5.98
+90 1.54
+118 0.39
diff --git a/inst/doc/KinGUI/A_SFO_report_detailed.txt b/inst/doc/KinGUI/A_SFO_report_detailed.txt new file mode 100644 index 0000000..98e5979 --- /dev/null +++ b/inst/doc/KinGUI/A_SFO_report_detailed.txt @@ -0,0 +1,80 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\A_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k: 0.1000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 8 0 8
+ Number of parameters: 2 0 2
+ Degrees of Freedom: 6 0 6
+
+ Parent Sink All
+
+ RMSE: 6.0801 NaN 6.0801
+ Chi2Sigma: 4.1971 NaN 4.1971
+ Chi2Err%: 8.3852 NaN 8.3852
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 6
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k 0.0372 0.0267 0.0477 0.0043 6.5e-005
+ Parent_FFS 1.0000
+ Parent_M(0) 109.1513 98.4079 119.8947 4.3906
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 18.6257 NaN
+ DT90: 61.8733 NaN
+ Kinetic model: sfo sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9845 NaN 0.9845
+ R-square: 0.9856 NaN 0.9856
+
+# Correlation matrix of parameters
+ Parent_k Parent_M
+ Parent_k 1.0000 0.5750
+ Parent_M 0.5750 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 101.2400 109.1513 -7.9113 NaN 0.0000 NaN
+ 3.0 99.2700 97.6209 1.6491 NaN 11.5304 NaN
+ 7.0 90.1100 84.1191 5.9909 NaN 25.0322 NaN
+ 14.0 72.1900 64.8276 7.3624 NaN 44.3237 NaN
+ 30.0 29.7100 35.7411 -6.0311 NaN 73.4102 NaN
+ 62.0 5.9800 10.8638 -4.8838 NaN 98.2875 NaN
+ 90.0 1.5400 3.8322 -2.2922 NaN 105.3191 NaN
+ 118.0 0.3900 1.3518 -0.9618 NaN 107.7995 NaN
+
diff --git a/inst/doc/KinGUI/B_DFOP_report_detailed.txt b/inst/doc/KinGUI/B_DFOP_report_detailed.txt new file mode 100644 index 0000000..e30f7b1 --- /dev/null +++ b/inst/doc/KinGUI/B_DFOP_report_detailed.txt @@ -0,0 +1,86 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\B_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k1: 0.1000 0.0000 Inf
+ Parent_k2: 0.0100 0.0000 Inf
+ Parent_g: 0.5000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 8 0 8
+ Number of parameters: 4 0 4
+ Degrees of Freedom: 4 0 4
+
+ Parent Sink All
+
+ RMSE: 2.6723 NaN 2.6723
+ Chi2Sigma: 1.7351 NaN 1.7351
+ Chi2Err%: 4.9554 NaN 4.9554
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 4
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k1 0.1024 -0.4603 0.6650 0.2027 0.3200
+ Parent_k2 0.0580 -0.2942 0.4102 0.1268 0.3355
+ Parent_g 0.5406 -9.3329 10.4141 3.5562 0.4433
+ Parent_FFS 1.0000
+ Parent_M(0) 99.6744 92.5981 106.7508 2.5487
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 8.6786 NaN
+ DT90: 30.8006 NaN
+ Kinetic model: dfop sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9973 NaN 0.9973
+ R-square: 0.9973 NaN 0.9973
+
+# Correlation matrix of parameters
+ Parent_k1 Parent_k2 Parent_g Parent_M
+ Parent_k1 1.0000 0.9674 -0.9908 0.3017
+ Parent_k2 0.9674 1.0000 -0.9919 0.2094
+ Parent_g -0.9908 -0.9919 1.0000 -0.2409
+ Parent_M 0.3017 0.2094 -0.2409 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 98.6200 99.6744 -1.0544 NaN 0.0000 NaN
+ 3.0 81.4300 78.1107 3.3193 NaN 21.5637 NaN
+ 7.0 53.1800 56.8237 -3.6437 NaN 42.8507 NaN
+ 14.0 34.8900 33.1764 1.7136 NaN 66.4981 NaN
+ 30.0 10.0900 10.5286 -0.4386 NaN 89.1458 NaN
+ 62.0 1.5000 1.3480 0.1520 NaN 98.3264 NaN
+ 90.0 0.3300 0.2522 0.0778 NaN 99.4222 NaN
+ 118.0 0.0800 0.0489 0.0311 NaN 99.6255 NaN
+
diff --git a/inst/doc/KinGUI/B_FOMC_report_detailed.txt b/inst/doc/KinGUI/B_FOMC_report_detailed.txt new file mode 100644 index 0000000..449ab34 --- /dev/null +++ b/inst/doc/KinGUI/B_FOMC_report_detailed.txt @@ -0,0 +1,83 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\B_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_alpha: 1.0000 0.0000 Inf
+ Parent_beta: 10.0000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 8 0 8
+ Number of parameters: 3 0 3
+ Degrees of Freedom: 5 0 5
+
+ Parent Sink All
+
+ RMSE: 2.4135 NaN 2.4135
+ Chi2Sigma: 1.6220 NaN 1.6220
+ Chi2Err%: 4.6322 NaN 4.6322
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 5
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_alpha 8.5369 -15.5894 32.6631 9.3855 0.2024
+ Parent_beta 101.4875 -206.6864 409.6614 119.8849 0.2179
+ Parent_FFS 1.0000
+ Parent_M(0) 99.9273 94.1784 105.6762 2.2364
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 8.5840 NaN
+ DT90: 31.4206 NaN
+ Kinetic model: fomc sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9973 NaN 0.9973
+ R-square: 0.9973 NaN 0.9973
+
+# Correlation matrix of parameters
+ Parent_alpha Parent_beta Parent_M
+ Parent_alpha 1.0000 0.9989 -0.3574
+ Parent_beta 0.9989 1.0000 -0.3825
+ Parent_M -0.3574 -0.3825 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 98.6200 99.9273 -1.3073 NaN 0.0000 NaN
+ 3.0 81.4300 77.9251 3.5049 NaN 22.0022 NaN
+ 7.0 53.1800 56.5452 -3.3652 NaN 43.3822 NaN
+ 14.0 34.8900 33.1569 1.7331 NaN 66.7704 NaN
+ 30.0 10.0900 10.9528 -0.8628 NaN 88.9745 NaN
+ 62.0 1.5000 1.7058 -0.2058 NaN 98.2215 NaN
+ 90.0 0.3300 0.4424 -0.1124 NaN 99.4849 NaN
+ 118.0 0.0800 0.1380 -0.0580 NaN 99.7893 NaN
+
diff --git a/inst/doc/KinGUI/B_HS_report_detailed.txt b/inst/doc/KinGUI/B_HS_report_detailed.txt new file mode 100644 index 0000000..f723ea4 --- /dev/null +++ b/inst/doc/KinGUI/B_HS_report_detailed.txt @@ -0,0 +1,86 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\B_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k1: 0.1000 0.0000 Inf
+ Parent_k2: 0.0100 0.0000 Inf
+ Parent_tb: 3.0000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 8 0 8
+ Number of parameters: 4 0 4
+ Degrees of Freedom: 4 0 4
+
+ Parent Sink All
+
+ RMSE: 2.7291 NaN 2.7291
+ Chi2Sigma: 1.7720 NaN 1.7720
+ Chi2Err%: 5.0608 NaN 5.0608
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 4
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k1 0.0747 0.0369 0.1124 0.0136 0.0027
+ Parent_k2 0.0799 0.0614 0.0984 0.0067 1.4e-004
+ Parent_tb 3.0662 NaN NaN NaN NaN
+ Parent_FFS 1.0000
+ Parent_M(0) 99.0235 91.4501 106.5970 2.7277
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 8.8792 NaN
+ DT90: 29.0329 NaN
+ Kinetic model: hs sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9972 NaN 0.9972
+ R-square: 0.9973 NaN 0.9973
+
+# Correlation matrix of parameters
+ Parent_k1 Parent_k2 Parent_tb Parent_M
+ Parent_k1 1.0000 -0.4395 NaN 0.6629
+ Parent_k2 -0.4395 1.0000 NaN -0.0336
+ Parent_tb NaN NaN NaN NaN
+ Parent_M 0.6629 -0.0336 NaN 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 98.6200 99.0235 -0.4035 NaN 0.0000 NaN
+ 3.0 81.4300 79.1517 2.2783 NaN 19.8719 NaN
+ 7.0 53.1800 57.5283 -4.3483 NaN 41.4952 NaN
+ 14.0 34.8900 32.8934 1.9966 NaN 66.1302 NaN
+ 30.0 10.0900 9.1664 0.9236 NaN 89.8572 NaN
+ 62.0 1.5000 0.7118 0.7882 NaN 98.3117 NaN
+ 90.0 0.3300 0.0761 0.2539 NaN 98.9475 NaN
+ 118.0 0.0800 0.0081 0.0719 NaN 99.0154 NaN
+
diff --git a/inst/doc/KinGUI/B_KinGUI.txt b/inst/doc/KinGUI/B_KinGUI.txt index 6a589b2..f48e076 100644 --- a/inst/doc/KinGUI/B_KinGUI.txt +++ b/inst/doc/KinGUI/B_KinGUI.txt @@ -1,13 +1,13 @@ -Version: 1.1 -Project: -Testsystem: -Comment: NA -t parent -0 98.62 -3 81.43 -7 53.18 -14 34.89 -30 10.09 -62 1.5 -90 0.33 -118 0.08 +Version: 1.1
+Project:
+Testsystem:
+Comment: NA
+t parent
+0 98.62
+3 81.43
+7 53.18
+14 34.89
+30 10.09
+62 1.5
+90 0.33
+118 0.08
diff --git a/inst/doc/KinGUI/B_SFO_report_detailed.txt b/inst/doc/KinGUI/B_SFO_report_detailed.txt new file mode 100644 index 0000000..ff6e9c8 --- /dev/null +++ b/inst/doc/KinGUI/B_SFO_report_detailed.txt @@ -0,0 +1,80 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\B_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k: 0.1000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 8 0 8
+ Number of parameters: 2 0 2
+ Degrees of Freedom: 6 0 6
+
+ Parent Sink All
+
+ RMSE: 2.2604 NaN 2.2604
+ Chi2Sigma: 1.5603 NaN 1.5603
+ Chi2Err%: 4.4562 NaN 4.4562
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 6
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k 0.0782 0.0687 0.0876 0.0039 4.7e-007
+ Parent_FFS 1.0000
+ Parent_M(0) 99.1741 94.4666 103.8816 1.9239
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 8.8686 NaN
+ DT90: 29.4608 NaN
+ Kinetic model: sfo sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9971 NaN 0.9971
+ R-square: 0.9972 NaN 0.9972
+
+# Correlation matrix of parameters
+ Parent_k Parent_M
+ Parent_k 1.0000 0.5804
+ Parent_M 0.5804 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 98.6200 99.1741 -0.5541 NaN 0.0000 NaN
+ 3.0 81.4300 78.4455 2.9845 NaN 20.7286 NaN
+ 7.0 53.1800 57.3844 -4.2044 NaN 41.7897 NaN
+ 14.0 34.8900 33.2040 1.6860 NaN 65.9701 NaN
+ 30.0 10.0900 9.5081 0.5819 NaN 89.6660 NaN
+ 62.0 1.5000 0.7797 0.7203 NaN 98.3944 NaN
+ 90.0 0.3300 0.0874 0.2426 NaN 99.0867 NaN
+ 118.0 0.0800 0.0098 0.0702 NaN 99.1643 NaN
+
diff --git a/inst/doc/KinGUI/C_DFOP_report_detailed.txt b/inst/doc/KinGUI/C_DFOP_report_detailed.txt new file mode 100644 index 0000000..b26c063 --- /dev/null +++ b/inst/doc/KinGUI/C_DFOP_report_detailed.txt @@ -0,0 +1,87 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\C_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k1: 0.1000 0.0000 Inf
+ Parent_k2: 0.0100 0.0000 Inf
+ Parent_g: 0.5000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 9 0 9
+ Number of parameters: 4 0 4
+ Degrees of Freedom: 5 0 5
+
+ Parent Sink All
+
+ RMSE: 0.9341 NaN 0.9341
+ Chi2Sigma: 0.6278 NaN 0.6278
+ Chi2Err%: 2.6613 NaN 2.6613
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 5
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k1 0.4594 0.4071 0.5117 0.0204 1.6e-006
+ Parent_k2 0.0178 0.0100 0.0256 0.0030 0.0010
+ Parent_g 0.8540 0.8194 0.8885 0.0134 9.1e-009
+ Parent_FFS 1.0000
+ Parent_M(0) 84.9867 82.6972 87.2762 0.8907
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 1.8876 NaN
+ DT90: 21.2511 NaN
+ Kinetic model: dfop sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9994 NaN 0.9994
+ R-square: 0.9994 NaN 0.9994
+
+# Correlation matrix of parameters
+ Parent_k1 Parent_k2 Parent_g Parent_M
+ Parent_k1 1.0000 0.4657 -0.6601 0.4339
+ Parent_k2 0.4657 1.0000 -0.7418 0.0793
+ Parent_g -0.6601 -0.7418 1.0000 -0.0190
+ Parent_M 0.4339 0.0793 -0.0190 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 85.1000 84.9867 0.1133 NaN 0.0000 NaN
+ 1.0 57.9000 58.0356 -0.1356 NaN 26.9512 NaN
+ 3.0 29.9000 30.0560 -0.1560 NaN 54.9308 NaN
+ 7.0 14.6000 13.8653 0.7347 NaN 71.1214 NaN
+ 14.0 9.7000 9.7841 -0.0841 NaN 75.2026 NaN
+ 28.0 6.6000 7.5314 -0.9314 NaN 77.4553 NaN
+ 63.0 4.0000 4.0343 -0.0343 NaN 80.9524 NaN
+ 91.0 3.9000 2.4485 1.4515 NaN 82.5382 NaN
+ 119.0 0.6000 1.4860 -0.8860 NaN 83.5007 NaN
+
diff --git a/inst/doc/KinGUI/C_FOMC_report_detailed.txt b/inst/doc/KinGUI/C_FOMC_report_detailed.txt new file mode 100644 index 0000000..f19484c --- /dev/null +++ b/inst/doc/KinGUI/C_FOMC_report_detailed.txt @@ -0,0 +1,84 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\C_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_alpha: 1.0000 0.0000 Inf
+ Parent_beta: 10.0000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 9 0 9
+ Number of parameters: 3 0 3
+ Degrees of Freedom: 6 0 6
+
+ Parent Sink All
+
+ RMSE: 2.2749 NaN 2.2749
+ Chi2Sigma: 1.5704 NaN 1.5704
+ Chi2Err%: 6.6572 NaN 6.6572
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 6
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_alpha 1.0540 0.6398 1.4681 0.1693 4.0e-004
+ Parent_beta 1.9192 0.6033 3.2352 0.5378 0.0059
+ Parent_FFS 1.0000
+ Parent_M(0) 85.8774 80.3817 91.3731 2.2460
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 1.7854 NaN
+ DT90: 15.1385 NaN
+ Kinetic model: fomc sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9955 NaN 0.9955
+ R-square: 0.9959 NaN 0.9959
+
+# Correlation matrix of parameters
+ Parent_alpha Parent_beta Parent_M
+ Parent_alpha 1.0000 0.9547 -0.2034
+ Parent_beta 0.9547 1.0000 -0.3624
+ Parent_M -0.2034 -0.3624 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 85.1000 85.8774 -0.7774 NaN 0.0000 NaN
+ 1.0 57.9000 55.1960 2.7040 NaN 30.6813 NaN
+ 3.0 29.9000 31.8455 -1.9455 NaN 54.0318 NaN
+ 7.0 14.6000 17.0087 -2.4087 NaN 68.8687 NaN
+ 14.0 9.7000 9.2363 0.4637 NaN 76.6411 NaN
+ 28.0 6.6000 4.7498 1.8502 NaN 81.1275 NaN
+ 63.0 4.0000 2.0994 1.9006 NaN 83.7779 NaN
+ 91.0 3.9000 1.4387 2.4613 NaN 84.4387 NaN
+ 119.0 0.6000 1.0899 -0.4899 NaN 84.7874 NaN
+
diff --git a/inst/doc/KinGUI/C_HS_report_detailed.txt b/inst/doc/KinGUI/C_HS_report_detailed.txt new file mode 100644 index 0000000..b8a5753 --- /dev/null +++ b/inst/doc/KinGUI/C_HS_report_detailed.txt @@ -0,0 +1,87 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\C_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k1: 0.1000 0.0000 Inf
+ Parent_k2: 0.0100 0.0000 Inf
+ Parent_tb: 3.0000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 9 0 9
+ Number of parameters: 4 0 4
+ Degrees of Freedom: 5 0 5
+
+ Parent Sink All
+
+ RMSE: 1.6484 NaN 1.6484
+ Chi2Sigma: 1.1078 NaN 1.1078
+ Chi2Err%: 4.6963 NaN 4.6963
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 5
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k1 0.3560 0.3084 0.4036 0.0185 3.5e-006
+ Parent_k2 0.0227 0.0081 0.0372 0.0057 0.0052
+ Parent_tb 5.1547 4.0767 6.2327 0.4193 3.2e-005
+ Parent_FFS 1.0000
+ Parent_M(0) 84.4914 80.5387 88.4441 1.5377
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 1.9470 NaN
+ DT90: 25.7899 NaN
+ Kinetic model: hs sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9980 NaN 0.9980
+ R-square: 0.9980 NaN 0.9980
+
+# Correlation matrix of parameters
+ Parent_k1 Parent_k2 Parent_tb Parent_M
+ Parent_k1 1.0000 -0.0002 -0.5436 0.5345
+ Parent_k2 -0.0002 1.0000 -0.4781 -0.0001
+ Parent_tb -0.5436 -0.4781 1.0000 -0.1210
+ Parent_M 0.5345 -0.0001 -0.1210 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 85.1000 84.4914 0.6086 NaN 0.0000 NaN
+ 1.0 57.9000 59.1836 -1.2836 NaN 25.3078 NaN
+ 3.0 29.9000 29.0389 0.8611 NaN 55.4525 NaN
+ 7.0 14.6000 12.9326 1.6674 NaN 71.5588 NaN
+ 14.0 9.7000 11.0360 -1.3360 NaN 73.4553 NaN
+ 28.0 6.6000 8.0365 -1.4365 NaN 76.4548 NaN
+ 63.0 4.0000 3.6367 0.3633 NaN 80.8547 NaN
+ 91.0 3.9000 1.9285 1.9715 NaN 82.5629 NaN
+ 119.0 0.6000 1.0226 -0.4226 NaN 83.4687 NaN
+
diff --git a/inst/doc/KinGUI/C_KinGUI.txt b/inst/doc/KinGUI/C_KinGUI.txt index 1e0e3d8..87f3191 100644 --- a/inst/doc/KinGUI/C_KinGUI.txt +++ b/inst/doc/KinGUI/C_KinGUI.txt @@ -1,14 +1,14 @@ -Version: 1.1 -Project: -Testsystem: -Comment: NA -t parent -0 85.1 -1 57.9 -3 29.9 -7 14.6 -14 9.7 -28 6.6 -63 4 -91 3.9 -119 0.6 +Version: 1.1
+Project:
+Testsystem:
+Comment: NA
+t parent
+0 85.1
+1 57.9
+3 29.9
+7 14.6
+14 9.7
+28 6.6
+63 4
+91 3.9
+119 0.6
diff --git a/inst/doc/KinGUI/C_SFO_report_detailed.txt b/inst/doc/KinGUI/C_SFO_report_detailed.txt new file mode 100644 index 0000000..512e10e --- /dev/null +++ b/inst/doc/KinGUI/C_SFO_report_detailed.txt @@ -0,0 +1,81 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\C_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k: 0.1000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 9 0 9
+ Number of parameters: 2 0 2
+ Degrees of Freedom: 7 0 7
+
+ Parent Sink All
+
+ RMSE: 5.2987 NaN 5.2987
+ Chi2Sigma: 3.7378 NaN 3.7378
+ Chi2Err%: 15.8456 NaN 15.8456
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 7
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k 0.3060 0.1975 0.4146 0.0459 1.4e-004
+ Parent_FFS 1.0000
+ Parent_M(0) 82.4905 71.2818 93.6992 4.7402
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 2.2649 NaN
+ DT90: 7.5240 NaN
+ Kinetic model: sfo sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9714 NaN 0.9714
+ R-square: 0.9869 NaN 0.9869
+
+# Correlation matrix of parameters
+ Parent_k Parent_M
+ Parent_k 1.0000 0.5212
+ Parent_M 0.5212 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 85.1000 82.4905 2.6095 NaN 0.0000 NaN
+ 1.0 57.9000 60.7429 -2.8429 NaN 21.7476 NaN
+ 3.0 29.9000 32.9366 -3.0366 NaN 49.5539 NaN
+ 7.0 14.6000 9.6838 4.9162 NaN 72.8067 NaN
+ 14.0 9.7000 1.1368 8.5632 NaN 81.3537 NaN
+ 28.0 6.6000 0.0157 6.5843 NaN 82.4749 NaN
+ 63.0 4.0000 0.0000 4.0000 NaN 82.4905 NaN
+ 91.0 3.9000 0.0000 3.9000 NaN 82.4905 NaN
+ 119.0 0.6000 0.0000 0.6000 NaN 82.4905 NaN
+
diff --git a/inst/doc/KinGUI/D_DFOP_report_detailed.txt b/inst/doc/KinGUI/D_DFOP_report_detailed.txt new file mode 100644 index 0000000..8326b6b --- /dev/null +++ b/inst/doc/KinGUI/D_DFOP_report_detailed.txt @@ -0,0 +1,100 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\D_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k1: 0.1000 0.0000 Inf
+ Parent_k2: 0.0100 0.0000 Inf
+ Parent_g: 0.5000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 9 0 9
+ Number of parameters: 4 0 4
+ Degrees of Freedom: 5 0 5
+
+ Parent Sink All
+
+ RMSE: 4.2785 NaN 4.2785
+ Chi2Sigma: 2.8753 NaN 2.8753
+ Chi2Err%: 7.2751 NaN 7.2751
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 14
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k1 0.0982<-1000.0000 >1000.0000 696.9952 0.4999
+ Parent_k2 0.0976<-1000.0000 >1000.0000 852.9518 0.5000
+ Parent_g 0.5524<-1000.0000 >1000.0000 >1000.0000 0.5000
+ Parent_FFS 1.0000
+ Parent_M(0) 99.4470 93.8860 105.0081 2.5928
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 7.0773 NaN
+ DT90: 23.5106 NaN
+ Kinetic model: dfop sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9919 NaN 0.9919
+ R-square: 0.9919 NaN 0.9919
+
+# Correlation matrix of parameters
+ Parent_k1 Parent_k2 Parent_g Parent_M
+ Parent_k1 1.0000 1.0000 -1.0000 0.5546
+ Parent_k2 1.0000 1.0000 -1.0000 0.5530
+ Parent_g -1.0000 -1.0000 1.0000 -0.5538
+ Parent_M 0.5546 0.5530 -0.5538 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 99.4600 99.4470 0.0130 NaN 0.0000 NaN
+ 0.0 102.0400 99.4470 2.5930 NaN 0.0000 NaN
+ 1.0 93.5000 90.1690 3.3310 NaN 9.2780 NaN
+ 1.0 92.5000 90.1690 2.3310 NaN 9.2780 NaN
+ 3.0 63.2300 74.1290 -10.8990 NaN 25.3180 NaN
+ 3.0 68.9900 74.1290 -5.1390 NaN 25.3180 NaN
+ 7.0 52.3200 50.1015 2.2185 NaN 49.3456 NaN
+ 7.0 55.1300 50.1015 5.0285 NaN 49.3456 NaN
+ 14.0 27.2700 25.2413 2.0287 NaN 74.2057 NaN
+ 14.0 26.6400 25.2413 1.3987 NaN 74.2057 NaN
+ 21.0 11.5000 12.7167 -1.2167 NaN 86.7303 NaN
+ 21.0 11.6400 12.7167 -1.0767 NaN 86.7303 NaN
+ 35.0 2.8500 3.2278 -0.3778 NaN 96.2192 NaN
+ 35.0 2.9100 3.2278 -0.3178 NaN 96.2192 NaN
+ 50.0 0.6900 0.7429 -0.0529 NaN 98.7042 NaN
+ 50.0 0.6300 0.7429 -0.1129 NaN 98.7042 NaN
+ 75.0 0.0500 0.0642 -0.0142 NaN 99.3828 NaN
+ 75.0 0.0600 0.0642 -0.0042 NaN 99.3828 NaN
+ 100.0 NaN 0.0056 NaN NaN 99.4415 NaN
+ 100.0 NaN 0.0056 NaN NaN 99.4415 NaN
+ 120.0 NaN 0.0008 NaN NaN 99.4463 NaN
+ 120.0 NaN 0.0008 NaN NaN 99.4463 NaN
+
diff --git a/inst/doc/KinGUI/D_FOMC_report_detailed.txt b/inst/doc/KinGUI/D_FOMC_report_detailed.txt new file mode 100644 index 0000000..a3ff6cc --- /dev/null +++ b/inst/doc/KinGUI/D_FOMC_report_detailed.txt @@ -0,0 +1,97 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\D_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_alpha: 1.0000 0.0000 Inf
+ Parent_beta: 10.0000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 9 0 9
+ Number of parameters: 3 0 3
+ Degrees of Freedom: 6 0 6
+
+ Parent Sink All
+
+ RMSE: 3.8927 NaN 3.8927
+ Chi2Sigma: 2.6871 NaN 2.6871
+ Chi2Err%: 6.7989 NaN 6.7989
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 15
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_alpha 11.4924 -23.1706 46.1555 16.2627 0.2453
+ Parent_beta 109.9914 -242.4545 462.4373 165.3550 0.2580
+ Parent_FFS 1.0000
+ Parent_M(0) 100.1262 95.6389 104.6136 2.1053
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 6.8381 NaN
+ DT90: 24.4003 NaN
+ Kinetic model: fomc sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9920 NaN 0.9920
+ R-square: 0.9921 NaN 0.9921
+
+# Correlation matrix of parameters
+ Parent_alpha Parent_beta Parent_M
+ Parent_alpha 1.0000 0.9994 -0.4135
+ Parent_beta 0.9994 1.0000 -0.4306
+ Parent_M -0.4135 -0.4306 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 99.4600 100.1262 -0.6662 NaN 0.0000 NaN
+ 0.0 102.0400 100.1262 1.9138 NaN 0.0000 NaN
+ 1.0 93.5000 90.2352 3.2648 NaN 9.8911 NaN
+ 1.0 92.5000 90.2352 2.2648 NaN 9.8911 NaN
+ 3.0 63.2300 73.4920 -10.2620 NaN 26.6343 NaN
+ 3.0 68.9900 73.4920 -4.5020 NaN 26.6343 NaN
+ 7.0 52.3200 49.2726 3.0474 NaN 50.8536 NaN
+ 7.0 55.1300 49.2726 5.8574 NaN 50.8536 NaN
+ 14.0 27.2700 25.2676 2.0024 NaN 74.8586 NaN
+ 14.0 26.6400 25.2676 1.3724 NaN 74.8586 NaN
+ 21.0 11.5000 13.4417 -1.9417 NaN 86.6845 NaN
+ 21.0 11.6400 13.4417 -1.8017 NaN 86.6845 NaN
+ 35.0 2.8500 4.1845 -1.3345 NaN 95.9417 NaN
+ 35.0 2.9100 4.1845 -1.2745 NaN 95.9417 NaN
+ 50.0 0.6900 1.3499 -0.6599 NaN 98.7764 NaN
+ 50.0 0.6300 1.3499 -0.7199 NaN 98.7764 NaN
+ 75.0 0.0500 0.2545 -0.2045 NaN 99.8718 NaN
+ 75.0 0.0600 0.2545 -0.1945 NaN 99.8718 NaN
+ 100.0 NaN 0.0593 NaN NaN 100.0670 NaN
+ 100.0 NaN 0.0593 NaN NaN 100.0670 NaN
+ 120.0 NaN 0.0208 NaN NaN 100.1054 NaN
+ 120.0 NaN 0.0208 NaN NaN 100.1054 NaN
+
diff --git a/inst/doc/KinGUI/D_HS_report_detailed.txt b/inst/doc/KinGUI/D_HS_report_detailed.txt new file mode 100644 index 0000000..6f9030e --- /dev/null +++ b/inst/doc/KinGUI/D_HS_report_detailed.txt @@ -0,0 +1,100 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\D_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k1: 0.1000 0.0000 Inf
+ Parent_k2: 0.0100 0.0000 Inf
+ Parent_tb: 3.0000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 9 0 9
+ Number of parameters: 4 0 4
+ Degrees of Freedom: 5 0 5
+
+ Parent Sink All
+
+ RMSE: 3.4039 NaN 3.4039
+ Chi2Sigma: 2.2876 NaN 2.2876
+ Chi2Err%: 5.7881 NaN 5.7881
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 14
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k1 0.1219 0.0502 0.1935 0.0334 0.0013
+ Parent_k2 0.0879 0.0757 0.1001 0.0057 1.7e-010
+ Parent_tb 2.9984 1.1617 4.8350 0.8563 0.0018
+ Parent_FFS 1.0000
+ Parent_M(0) 101.1066 96.3031 105.9101 2.2396
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 6.7257 NaN
+ DT90: 25.0308 NaN
+ Kinetic model: hs sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9945 NaN 0.9945
+ R-square: 0.9948 NaN 0.9948
+
+# Correlation matrix of parameters
+ Parent_k1 Parent_k2 Parent_tb Parent_M
+ Parent_k1 1.0000 0.0001 0.9101 0.6628
+ Parent_k2 0.0001 1.0000 0.1728 0.0000
+ Parent_tb 0.9101 0.1728 1.0000 0.4166
+ Parent_M 0.6628 0.0000 0.4166 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 99.4600 101.1066 -1.6466 NaN 0.0000 NaN
+ 0.0 102.0400 101.1066 0.9334 NaN 0.0000 NaN
+ 1.0 93.5000 89.5056 3.9944 NaN 11.6010 NaN
+ 1.0 92.5000 89.5056 2.9944 NaN 11.6010 NaN
+ 3.0 63.2300 70.1481 -6.9181 NaN 30.9585 NaN
+ 3.0 68.9900 70.1481 -1.1581 NaN 30.9585 NaN
+ 7.0 52.3200 49.3489 2.9711 NaN 51.7577 NaN
+ 7.0 55.1300 49.3489 5.7811 NaN 51.7577 NaN
+ 14.0 27.2700 26.6677 0.6023 NaN 74.4389 NaN
+ 14.0 26.6400 26.6677 -0.0277 NaN 74.4389 NaN
+ 21.0 11.5000 14.4109 -2.9109 NaN 86.6956 NaN
+ 21.0 11.6400 14.4109 -2.7709 NaN 86.6956 NaN
+ 35.0 2.8500 4.2083 -1.3583 NaN 96.8983 NaN
+ 35.0 2.9100 4.2083 -1.2983 NaN 96.8983 NaN
+ 50.0 0.6900 1.1255 -0.4355 NaN 99.9811 NaN
+ 50.0 0.6300 1.1255 -0.4955 NaN 99.9811 NaN
+ 75.0 0.0500 0.1249 -0.0749 NaN 100.9816 NaN
+ 75.0 0.0600 0.1249 -0.0649 NaN 100.9816 NaN
+ 100.0 NaN 0.0139 NaN NaN 101.0927 NaN
+ 100.0 NaN 0.0139 NaN NaN 101.0927 NaN
+ 120.0 NaN 0.0024 NaN NaN 101.1042 NaN
+ 120.0 NaN 0.0024 NaN NaN 101.1042 NaN
+
diff --git a/inst/doc/KinGUI/D_KinGUI.txt b/inst/doc/KinGUI/D_KinGUI.txt index f1c53e9..a79ee5e 100644 --- a/inst/doc/KinGUI/D_KinGUI.txt +++ b/inst/doc/KinGUI/D_KinGUI.txt @@ -1,27 +1,27 @@ -Version: 1.1 -Project: -Testsystem: -Comment: NA -t parent m1 -0 99.46 0 -0 102.04 0 -1 93.5 4.84 -1 92.5 5.64 -3 63.23 12.91 -3 68.99 12.96 -7 52.32 22.97 -7 55.13 24.47 -14 27.27 41.69 -14 26.64 33.21 -21 11.5 44.37 -21 11.64 46.44 -35 2.85 41.22 -35 2.91 37.95 -50 0.69 41.19 -50 0.63 40.01 -75 0.05 40.09 -75 0.06 33.85 -100 NaN 31.04 -100 NaN 33.13 -120 NaN 25.15 -120 NaN 33.31 +Version: 1.1
+Project:
+Testsystem:
+Comment: NA
+t parent m1
+0 99.46 0
+0 102.04 0
+1 93.5 4.84
+1 92.5 5.64
+3 63.23 12.91
+3 68.99 12.96
+7 52.32 22.97
+7 55.13 24.47
+14 27.27 41.69
+14 26.64 33.21
+21 11.5 44.37
+21 11.64 46.44
+35 2.85 41.22
+35 2.91 37.95
+50 0.69 41.19
+50 0.63 40.01
+75 0.05 40.09
+75 0.06 33.85
+100 NaN 31.04
+100 NaN 33.13
+120 NaN 25.15
+120 NaN 33.31
diff --git a/inst/doc/KinGUI/D_SFO_report_detailed.txt b/inst/doc/KinGUI/D_SFO_report_detailed.txt new file mode 100644 index 0000000..24ace5f --- /dev/null +++ b/inst/doc/KinGUI/D_SFO_report_detailed.txt @@ -0,0 +1,94 @@ +Project:
+Testsystem:
+Comment: NA
+
+KinGUI Version: 1.1
+
+Input Data: C:\Documents and Settings\jranke\My Documents\R\mkin.BerliOS\R_packages\kinfit\trunk\inst\doc\KinGUI\D_KinGUI.txt
+
+# =================================
+# Results of the kinetic evaluation
+# =================================
+
+# ---------------------------------
+# Initial values
+# ---------------------------------
+ Initial Value Lower Bound Upper Bound
+ Parent_M(0): 100.0000 0.0000 Inf
+ Parent_k: 0.1000 0.0000 Inf
+ Sink_M(0): 0.0000 0.0000 Inf
+
+# ---------------------------------
+# Chi2 error estimation
+# ---------------------------------
+ Parent Sink All
+ Number of data sets: 9 0 9
+ Number of parameters: 2 0 2
+ Degrees of Freedom: 7 0 7
+
+ Parent Sink All
+
+ RMSE: 3.6160 NaN 3.6160
+ Chi2Sigma: 2.5508 NaN 2.5508
+ Chi2Err%: 6.4539 NaN 6.4539
+
+# ---------------------------------
+# Parameter estimation
+# ---------------------------------
+
+ Degrees of Freedom: 16
+ Parameter Estimate Lower CI Upper CI St.Dev Prob > t
+ Parent_k 0.0979 0.0877 0.1082 0.0048 3.8e-013
+ Parent_FFS 1.0000
+ Parent_M(0) 99.4442 95.5614 103.3271 1.8316
+ Sink_M(0) 0.0000
+
+# ---------------------------------
+# DT50 and DT90 values
+# ---------------------------------
+ Parent Sink
+ DT50: 7.0776 NaN
+ DT90: 23.5112 NaN
+ Kinetic model: sfo sink
+
+# ---------------------------------
+# Additional Statistics
+# ---------------------------------
+# Correlation and R-square of predicted vs. measured data
+ Parent Sink All
+ EF: 0.9919 NaN 0.9919
+ R-square: 0.9919 NaN 0.9919
+
+# Correlation matrix of parameters
+ Parent_k Parent_M
+ Parent_k 1.0000 0.5360
+ Parent_M 0.5360 1.0000
+
+# ---------------------------------
+# Measured vs. predicted values
+# ---------------------------------
+ Time Compartment Parent Compartment Sink
+ measured predicted residual measured predicted residual
+ 0.0 99.4600 99.4442 0.0158 NaN 0.0000 NaN
+ 0.0 102.0400 99.4442 2.5958 NaN 0.0000 NaN
+ 1.0 93.5000 90.1668 3.3332 NaN 9.2774 NaN
+ 1.0 92.5000 90.1668 2.3332 NaN 9.2774 NaN
+ 3.0 63.2300 74.1277 -10.8977 NaN 25.3165 NaN
+ 3.0 68.9900 74.1277 -5.1377 NaN 25.3165 NaN
+ 7.0 52.3200 50.1013 2.2187 NaN 49.3430 NaN
+ 7.0 55.1300 50.1013 5.0287 NaN 49.3430 NaN
+ 14.0 27.2700 25.2417 2.0283 NaN 74.2026 NaN
+ 14.0 26.6400 25.2417 1.3983 NaN 74.2026 NaN
+ 21.0 11.5000 12.7171 -1.2171 NaN 86.7272 NaN
+ 21.0 11.6400 12.7171 -1.0771 NaN 86.7272 NaN
+ 35.0 2.8500 3.2279 -0.3779 NaN 96.2163 NaN
+ 35.0 2.9100 3.2279 -0.3179 NaN 96.2163 NaN
+ 50.0 0.6900 0.7429 -0.0529 NaN 98.7013 NaN
+ 50.0 0.6300 0.7429 -0.1129 NaN 98.7013 NaN
+ 75.0 0.0500 0.0642 -0.0142 NaN 99.3800 NaN
+ 75.0 0.0600 0.0642 -0.0042 NaN 99.3800 NaN
+ 100.0 NaN 0.0055 NaN NaN 99.4387 NaN
+ 100.0 NaN 0.0055 NaN NaN 99.4387 NaN
+ 120.0 NaN 0.0008 NaN NaN 99.4435 NaN
+ 120.0 NaN 0.0008 NaN NaN 99.4435 NaN
+
diff --git a/inst/doc/KinGUI/F_system_KinGUI.txt b/inst/doc/KinGUI/F_system_KinGUI.txt index 92bd722..ba130e0 100644 --- a/inst/doc/KinGUI/F_system_KinGUI.txt +++ b/inst/doc/KinGUI/F_system_KinGUI.txt @@ -1,14 +1,14 @@ -Version: 1.1 -Project: -Testsystem: -Comment: NA -t parent -0 95.6 -3 91.9 -7 86.5 -14 72.9 -28 29.6 -43 10 -56 6.8 -70 3.5 -100 4.2 +Version: 1.1
+Project:
+Testsystem:
+Comment: NA
+t parent
+0 95.6
+3 91.9
+7 86.5
+14 72.9
+28 29.6
+43 10
+56 6.8
+70 3.5
+100 4.2
diff --git a/inst/doc/KinGUI/F_water_KinGUI.txt b/inst/doc/KinGUI/F_water_KinGUI.txt index ce3611d..bd80f86 100644 --- a/inst/doc/KinGUI/F_water_KinGUI.txt +++ b/inst/doc/KinGUI/F_water_KinGUI.txt @@ -1,14 +1,14 @@ -Version: 1.1 -Project: -Testsystem: -Comment: NA -t parent -0 95.6 -3 84.7 -7 74.6 -14 54.1 -28 13.5 -43 4.3 -56 2 -70 0.5 -100 0.8 +Version: 1.1
+Project:
+Testsystem:
+Comment: NA
+t parent
+0 95.6
+3 84.7
+7 74.6
+14 54.1
+28 13.5
+43 4.3
+56 2
+70 0.5
+100 0.8
diff --git a/inst/doc/kinfit.Rnw b/inst/doc/kinfit.Rnw index a433e44..3292fd1 100644 --- a/inst/doc/kinfit.Rnw +++ b/inst/doc/kinfit.Rnw @@ -1,3 +1,4 @@ +% $Id: kinfit.Rnw 125 2011-11-10 07:19:59Z jranke $
%%\VignetteIndexEntry{Routines for fitting kinetic models to chemical degradation data}
%%VignetteDepends{nls}
%%\usepackage{Sweave}
@@ -680,7 +681,7 @@ model are hardly distinguishable. As a consequence, the software packages strongly disagree especially on the model parameter $f$ specifying the
distribution between the kinetic domains that are characterised by the
two kinetic constants. Again, the \Rpackage{kinfit} routine does not
-show conversion for this model and this dataset (Table \ref{tab:vali.DFOP.A}).
+show convergence for this model and this dataset (Table \ref{tab:vali.DFOP.A}).
Fitting the DFOP model with \Rpackage{kinfit} to dataset B yields results
that are very close to the median of the results obtained by other packages,
@@ -912,6 +913,86 @@ The comparison shows that whenever a minimum error level $\chi^2$ was calculated using the \Rpackage{kinfit} package, it was very close to
the value generated by KinGUI.
+\subsection{$R^2$ value}
+
+In a similar manner, the coefficient of determination calculated by kinfit
+according to the formula
+
+\begin{equation}
+R^2 = 1 - RSS / TSS
+\end{equation}
+
+where RSS is the sum of squares of the residuals and TSS is the sum of squares
+of the deviations from the mean value is compared to the model efficiency EF
+calculated by KinGUI based on the same formula (FOCUS 2006, p. 99) as shown
+in Table \ref{tab:vali.R2}. This exercise was done for FOCUS datasets A to D
+only.
+
+<<KinGUI_write, echo=FALSE>>=
+R2.SFO.kinfit <- R2.FOMC.kinfit <- array(dim = 4,
+ dimnames = list(names(kinobjects[1:4])))
+R2.DFOP.kinfit <- R2.HS.kinfit <- array(dim = 4,
+ dimnames = list(names(kinobjects[1:4])))
+for (kinobjectname in names(kinobjects[1:4]))
+{
+ R2.SFO.kinfit[[kinobjectname]] <-
+ kinobjects[[kinobjectname]]$results$stats[["SFO", "R2"]]
+ R2.FOMC.kinfit[[kinobjectname]] <-
+ ifelse(class(kinobjects[[kinobjectname]]$fits$FOMC) == "try-error",
+ NA, kinobjects[[kinobjectname]]$results$stats[["FOMC", "R2"]])
+ R2.DFOP.kinfit[[kinobjectname]] <-
+ ifelse(class(kinobjects[[kinobjectname]]$fits$DFOP) == "try-error",
+ NA, kinobjects[[kinobjectname]]$results$stats[["DFOP", "R2"]])
+ R2.HS.kinfit[[kinobjectname]] <-
+ ifelse(class(kinobjects[[kinobjectname]]$fits$HS) == "try-error",
+ NA, kinobjects[[kinobjectname]]$results$stats[["HS", "R2"]])
+}
+
+EF.SFO.KinGUI <- c(0.9845, 0.9971, 0.9714, 0.9919)
+EF.FOMC.KinGUI <- c(0.9831, 0.9973, 0.9955, 0.9920)
+EF.HS.KinGUI <- c(0.9972, 0.9972, 0.9980, 0.9945)
+EF.DFOP.KinGUI <- c(0.9845, 0.9973, 0.9994, 0.9919)
+names(EF.SFO.KinGUI) <- names(EF.FOMC.KinGUI) <- names(kinobjects[1:4])
+names(EF.DFOP.KinGUI) <- names(EF.HS.KinGUI) <- names(kinobjects[1:4])
+
+R2 <- data.frame(
+ SFO.KinGUI = EF.SFO.KinGUI,
+ SFO.kinfit = round(R2.SFO.kinfit, 4),
+ FOMC.KinGUI = EF.FOMC.KinGUI,
+ FOMC.kinfit = round(R2.FOMC.kinfit, 4),
+ DFOP.KinGUI = EF.DFOP.KinGUI,
+ DFOP.kinfit = round(R2.DFOP.kinfit, 4),
+ HS.KinGUI = EF.HS.KinGUI,
+ HS.kinfit = round(R2.HS.kinfit, 4)
+)
+write.table(R2,
+ file = "R2_comparison.tex",
+ sep=" & ", quote=FALSE, na="",
+ row.names=TRUE, col.names=FALSE, eol = " \\\\ \n")
+@
+
+\begin{table}
+\caption{Comparison of model efficiency (EF) values calculated
+by KinGUI and $R^2$ values calculated by \Rpackage{kinfit}. \label{tab:vali.R2}}
+\vspace{0.5cm}
+\begin{tabular}{lcccccccc}
+\toprule
+ & \multicolumn{2}{c}{SFO} &
+\multicolumn{2}{c}{FOMC} &
+\multicolumn{2}{c}{DFOP} &
+\multicolumn{2}{c}{HS} \\
+Dataset & KinGUI & \Rpackage{kinfit} & KinGUI & \Rpackage{kinfit} &
+KinGUI & \Rpackage{kinfit} & KinGUI & \Rpackage{kinfit} \\
+\midrule
+\input{R2_comparison}
+\bottomrule
+\end{tabular}
+\end{table}
+
+The comparison shows that whenever the comparison was possible, the $R^2$
+value calculated by the \Rpackage{kinfit} package was equal to the model
+efficiency calculated by KinGUI, both rounded to four digits.
+
\section{Conclusion}
The \Rpackage{kinfit} package for \RR{} gives access to the possibility to
diff --git a/inst/doc/kinfit.pdf b/inst/doc/kinfit.pdf Binary files differindex 2945545..d57b999 100644 --- a/inst/doc/kinfit.pdf +++ b/inst/doc/kinfit.pdf diff --git a/inst/doc/references.bib b/inst/doc/references.bib index 53e3bea..8cde4bd 100644 --- a/inst/doc/references.bib +++ b/inst/doc/references.bib @@ -28,8 +28,8 @@ }
@Inproceedings{ schaefer2007,
- title = {{KinGUI}: a new kinetic software tool for evaluations according to FOCUS degradation kinetics},
- author = {D. Sch\"{a}fer and M. Kikolasch and P. Rainbird and B. Harvey},
+ title = {{KinGUI}: a new kinetic software tool for evaluations according to {FOCUS} degradation kinetics},
+ author = {D. Sch\"{a}fer and M. Mikolasch and P. Rainbird and B. Harvey},
booktitle = {Proceedings of the XIII Symposium Pesticide Chemistry},
editor = {Del Re A. A. M. and Capri E. and Fragoulis G. and Trevisan M.},
year = {2007},
diff --git a/man/kinfit.Rd b/man/kinfit.Rd index f0301fd..2e2ceb2 100644 --- a/man/kinfit.Rd +++ b/man/kinfit.Rd @@ -9,12 +9,12 @@ Fit kinetic models to chemical degradation data 2006 are fitted to a given dataframe of chemical degradation data.
}
\usage{
-kinfit(kindata, kinmodels = c("SFO"), parent.0.user = NA,
+kinfit(kindata, kinmodels = c("SFO"), parent.0.user = NA, parent.0.fixed = FALSE,
start.SFO = list(parent.0 = NA, k = NA),
start.FOMC = list(parent.0 = NA, alpha = NA, beta = NA),
start.DFOP = list(parent.0 = NA, k1 = NA, k2 = NA, g = NA),
start.HS = list(parent.0 = NA, k1 = NA, k2 = NA, tb = NA),
- algorithm = "port")
+ algorithm = "default")
}
\arguments{
\item{kindata}{
@@ -30,6 +30,10 @@ kinfit(kindata, kinmodels = c("SFO"), parent.0.user = NA, The user can give a starting estimate for parent.0 here, overriding other
potential sources for starting values as specified below.
}
+ \item{parent.0.fixed}{
+ If TRUE, the initial value for the observed value will be fixed to the
+ value specified by \code{parent.0.user}.
+ }
\item{start.SFO}{
A list of starting parameters for fitting the \code{\link{SFO}} model,
containing \code{parent.0} and \code{k}.
diff --git a/man/kinobject.Rd b/man/kinobject.Rd index cd6f0ca..c5c5f77 100644 --- a/man/kinobject.Rd +++ b/man/kinobject.Rd @@ -15,7 +15,7 @@ Function to initialise an object representing a kinetic experiment or trial. \item{type}{ The type of experiment or trial, optionally with an ID }
\item{system}{ System name. Important if several systems were used, e.g. several soils. }
\item{layers}{ Optional specification of the layer names in a field trial. }
- \item{sampling_times}{ Optional specification of the sampling time pionts. }
+ \item{sampling_times}{ Optional specification of the sampling time points. }
}
\value{
A list containing the specified information.
diff --git a/man/kinobjects.Rd b/man/kinobjects.Rd index 7c960f3..cbc46aa 100644 --- a/man/kinobjects.Rd +++ b/man/kinobjects.Rd @@ -15,7 +15,7 @@ Function to initialise several objects representing a kinetic experiment or tria \item{type}{ The type of experiment or trial, optionally with an ID }
\item{systems}{ An array of the system names }
\item{layers}{ Optional specification of the layer names in a field trial. }
- \item{sampling_times}{ Optional specification of the sampling time pionts. }
+ \item{sampling_times}{ Optional specification of the sampling time points. }
}
\value{
A list of lists containing the specified information.
diff --git a/man/kinplot.Rd b/man/kinplot.Rd index b6974ee..eb6363a 100644 --- a/man/kinplot.Rd +++ b/man/kinplot.Rd @@ -8,7 +8,7 @@ Creates a plot of the kinetic fits Function to create a plot for a set of fitted models
}
\usage{
-kinplot(kinobject, xlab = "Time [days]", ylab = "Parent [\% of applied radioactivity]", ylim = c("auto", "auto"), lpos = "topright")
+kinplot(kinobject, main = "", xlab = "Time [days]", ylab = "Parent [\% of applied radioactivity]", ylim = c("auto", "auto"), lpos = "topright")
}
\arguments{
\item{kinobject}{
@@ -17,6 +17,7 @@ kinplot(kinobject, xlab = "Time [days]", ylab = "Parent [\% of applied radioacti the type of the test system (\code{type}),
the name of the specific test system used for generating this dataset
(\code{system}),
+ the input dataset (\code{data}),
the list of fitted kinetic models (\code{fits}), as returned by
\code{\link{kinfit}}, and the list of results (\code{results})
as returned by \code{\link{kinresults}}.
@@ -25,6 +26,7 @@ kinplot(kinobject, xlab = "Time [days]", ylab = "Parent [\% of applied radioacti Optionally also
the label position of the test compound (\code{label}) and
the source of the data (\code{source}). }
+ \item{main}{ Title. }
\item{xlab}{ Label for the x axis. }
\item{ylab}{ Label for the y axis. }
\item{ylim}{ An array of length two holding the range for values on the y axis or "auto". }
diff --git a/man/kinreport.Rd b/man/kinreport.Rd index de7e632..f1b8111 100644 --- a/man/kinreport.Rd +++ b/man/kinreport.Rd @@ -9,7 +9,7 @@ Function to create a report for a set of fitted models, passing it to the console as well as to a file, if specified.
}
\usage{
-kinreport(kinobject, file = NA, vcov = FALSE, endpoint.digits = 1)
+kinreport(kinobject, file = NA, data = TRUE, R2 = FALSE, vcov = FALSE, endpoint.digits = 1)
}
\arguments{
\item{kinobject}{
@@ -18,6 +18,7 @@ kinreport(kinobject, file = NA, vcov = FALSE, endpoint.digits = 1) the type of the test system (\code{type}),
the name of the specific test system used for generating this dataset
(\code{system}),
+ the input dataset (\code{data}),
the list of fitted kinetic models (\code{fits}), as returned by
\code{\link{kinfit}}, and the list of results (\code{results})
as returned by \code{\link{kinresults}}.
@@ -25,12 +26,17 @@ kinreport(kinobject, file = NA, vcov = FALSE, endpoint.digits = 1) the label position of the test compound (\code{label}) and
the source of the data (\code{source}). }
\item{file}{ The name of the file to which to write. }
+ \item{data}{ Boolean specifying if the input data should be printed? }
+ \item{R2}{ Boolean specifying if the coefficient of determination R2 should
+ be printed. R2 is calculated from all values (not mean values) as 1 - RSS/TSS where
+ RSS is the sum of squares of residuals, and TSS ist the total sum of squares, i.e.
+ the sum of squares of the difference of each observation from the overall mean. }
\item{vcov}{ Should the variance-covariance matrix/matrices be reported? }
\item{endpoint.digits}{ How many digits should be reported for DT50 and DT90 values? }
}
\value{
The function is called for its side effect, namely the report being passed
-to the R console as well as to a text file.
+to the R console as well as to a text file if a filename is specified.
}
\author{ Johannes Ranke }
\examples{
@@ -40,6 +46,7 @@ kinobject <- list( parent = "Compound XY",
type = "Degradation in the environment",
system = "System 1",
+ data = FOCUS_2006_A,
source = "Synthetic example data from FOCUS kinetics",
fits = kinfits,
results = kinresults(kinfits))
diff --git a/man/kinresplot.Rd b/man/kinresplot.Rd index 85ec333..fcf0561 100644 --- a/man/kinresplot.Rd +++ b/man/kinresplot.Rd @@ -8,7 +8,7 @@ Creates a plot of the residual for specified kinetic fits Function to create a residual plot for a specified fitted model
}
\usage{
-kinresplot(kinobject, kinmodel, xlab = "Time [days]", ylab = "Residual [\% of applied radioactivity]", maxabs = "auto")
+ kinresplot(kinobject, kinmodel, xlab = "Time [days]", ylab = "Residual [\% of applied radioactivity]", maxabs = "auto")
}
\arguments{
\item{kinobject}{
diff --git a/man/kinresults.Rd b/man/kinresults.Rd index 6ab93a7..9e5bc43 100644 --- a/man/kinresults.Rd +++ b/man/kinresults.Rd @@ -9,7 +9,7 @@ This function collects the parameters and some statistics for the fitted kinetic models. It also generates DT50 and DT90 estimates.
}
\usage{
-kinresults(kinfits, alpha = 0.05, SFORB = TRUE)
+kinresults(kinfits, alpha = 0.05, DTmax = 1000, SFORB = TRUE)
}
\arguments{
\item{kinfits}{
@@ -20,6 +20,13 @@ have been generated by \code{\link{kinfit}}. The confidence level chosen for the chi-squared test used in the call to
\code{\link{kinerrmin}}.
}
+ \item{DTmax}{
+Upper end of the time interval that will be checked for the iterative determination
+of DT50 and DT90 values for the FOMC and the DFOP model. If the DT50 or the
+DT90 value is less than 0.1 different from \code{DTmax}, which will generally
+be the case if the optimization routine hits the upper end, the respective DT50 or
+DT90 value will be reported as \code{NA}.
+}
\item{SFORB}{
Should the results of the \code{\link{DFOP}} model be presented as parameters
to the Single First-Order Reversible Binding (SFORB) model? }
diff --git a/man/kinwrite.KinGUI.Rd b/man/kinwrite.KinGUI.Rd index f5a5ddc..c0910cf 100644 --- a/man/kinwrite.KinGUI.Rd +++ b/man/kinwrite.KinGUI.Rd @@ -35,7 +35,7 @@ An optional comment that will be integrated in the header of the KinGUI input fi The function is called for its side effect, namely the generation of a text file.
}
\references{
-Schäfer D, Kikolasch M, Rainbird P and Harvey B (2007). KinGUI: a new kinetic software tool for evaluations according to FOCUS degradation kinetics. In: Del Re AAM, Capri E, Fragoulis G and Trevisan M (Eds.). Proceedings of the XIII Symposium Pesticide Chemistry, Piacenza, 2007, p. 916-923.
+Schäfer D, Mikolasch M, Rainbird P and Harvey B (2007). KinGUI: a new kinetic software tool for evaluations according to FOCUS degradation kinetics. In: Del Re AAM, Capri E, Fragoulis G and Trevisan M (Eds.). Proceedings of the XIII Symposium Pesticide Chemistry, Piacenza, 2007, p. 916-923.
}
\note{
The KinGUI software tool was announced to be freely available on CD from the main author of the paper cited above, Dieter Schäfer <dieter.schaefer@bayercropscience.com>.
diff --git a/tests/test_FOCUS_2006_A.R b/tests/test_FOCUS_2006_A.R index 2077315..ff55174 100644 --- a/tests/test_FOCUS_2006_A.R +++ b/tests/test_FOCUS_2006_A.R @@ -1,3 +1,23 @@ +# $Id: test_FOCUS_2006_A.R 59 2010-07-28 12:29:15Z jranke $
+
+# Copyright (C) 2008-2010 Johannes Ranke
+# Contact: mkin-devel@lists.berlios.de
+
+# This file is part of the R package kinfit
+
+# kinfit is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>
+
library(kinfit)
data(FOCUS_2006_A)
fits <- kinfit(FOCUS_2006_A, kinmodels = c("SFO", "HS"))
diff --git a/tests/test_FOCUS_2006_A.Rout.save b/tests/test_FOCUS_2006_A.Rout.save index a26b701..d209084 100644 --- a/tests/test_FOCUS_2006_A.Rout.save +++ b/tests/test_FOCUS_2006_A.Rout.save @@ -1,7 +1,8 @@ -R version 2.10.0 (2009-10-26)
-Copyright (C) 2009 The R Foundation for Statistical Computing
+R version 2.14.0 (2011-10-31)
+Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
+Platform: i386-pc-mingw32/i386 (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
@@ -15,17 +16,35 @@ 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.
+> # $Id: test_FOCUS_2006_A.R 59 2010-07-28 12:29:15Z jranke $
+>
+> # Copyright (C) 2008-2010 Johannes Ranke
+> # Contact: mkin-devel@lists.berlios.de
+>
+> # This file is part of the R package kinfit
+>
+> # kinfit is free software: you can redistribute it and/or modify it under the
+> # terms of the GNU General Public License as published by the Free Software
+> # Foundation, either version 3 of the License, or (at your option) any later
+> # version.
+>
+> # This program is distributed in the hope that it will be useful, but WITHOUT
+> # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+> # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+> # details.
+>
+> # You should have received a copy of the GNU General Public License along with
+> # this program. If not, see <http://www.gnu.org/licenses/>
+>
> library(kinfit)
> data(FOCUS_2006_A)
> fits <- kinfit(FOCUS_2006_A, kinmodels = c("SFO", "HS"))
> print(kinresults(fits)$results, digits=5)
DT50 DT90
SFO 18.624 61.868
-HS 20.294 49.854
> print(kinresults(fits)$stats, digits=5)
- n.times df mean.means RSS err.min
-SFO 8 6 50.054 221.8078 0.083848
-HS 8 4 50.054 6.6927 0.016766
+ n.times df mean.means RSS err.min R2
+SFO 8 6 50.054 221.81 0.083848 0.9845
>
> data(FOCUS_2006_B)
> fits <- kinfit(FOCUS_2006_B, kinmodels = c("SFO", "FOMC", "DFOP"))
@@ -35,23 +54,23 @@ SFO 8.8686 29.461 FOMC 8.6834 30.754
DFOP 8.6829 30.789
> print(kinresults(fits)$stats, digits=5)
- n.times df mean.means RSS err.min
-SFO 8 6 35.015 30.656 0.044555
-FOMC 8 5 35.015 28.583 0.045886
-DFOP 8 4 35.015 28.550 0.049527
+ n.times df mean.means RSS err.min R2
+SFO 8 6 35.015 30.656 0.044555 0.99713
+FOMC 8 5 35.015 28.583 0.045886 0.99733
+DFOP 8 4 35.015 28.550 0.049527 0.99733
>
> data(FOCUS_2006_C)
> fits <- kinfit(FOCUS_2006_C, kinmodels = c("SFO", "FOMC", "DFOP"))
> print(kinresults(fits)$results, digits=5)
DT50 DT90
-SFO 2.2647 7.5232
+SFO 2.2647 7.5233
FOMC 1.7852 15.1479
DFOP 1.8869 21.2507
> print(kinresults(fits)$stats, digits=5)
- n.times df mean.means RSS err.min
-SFO 9 7 23.589 196.5334 0.158440
-FOMC 9 6 23.589 31.0509 0.066568
-DFOP 9 5 23.589 4.3627 0.026621
+ n.times df mean.means RSS err.min R2
+SFO 9 7 23.589 196.5334 0.158440 0.97136
+FOMC 9 6 23.589 31.0509 0.066568 0.99548
+DFOP 9 5 23.589 4.3627 0.026621 0.99936
>
> data(FOCUS_2006_D)
> fits <- kinfit(FOCUS_2006_D, kinmodels = c("SFO", "FOMC"))
@@ -60,20 +79,20 @@ DFOP 9 5 23.589 4.3627 0.026621 SFO 7.0776 23.511
FOMC 6.9350 24.044
> print(kinresults(fits)$stats, digits=5)
- n.times df mean.means RSS err.min
-SFO 9 7 39.523 207.63 0.064524
-FOMC 9 6 39.523 205.45 0.067802
+ n.times df mean.means RSS err.min R2
+SFO 9 7 39.523 207.63 0.064524 0.99194
+FOMC 9 6 39.523 205.45 0.067802 0.99202
>
> data(FOCUS_2006_E)
> fits <- kinfit(FOCUS_2006_E, kinmodels = c("SFO", "FOMC", "DFOP"))
> print(kinresults(fits)$results, digits=5)
DT50 DT90
-SFO 2.2647 7.5232
+SFO 2.2647 7.5233
FOMC 1.7852 15.1479
DFOP 1.8869 21.2507
> print(kinresults(fits)$stats, digits=5)
- n.times df mean.means RSS err.min
-SFO 9 7 23.589 196.5334 0.158440
-FOMC 9 6 23.589 31.0509 0.066568
-DFOP 9 5 23.589 4.3627 0.026621
+ n.times df mean.means RSS err.min R2
+SFO 9 7 23.589 196.5334 0.158440 0.97136
+FOMC 9 6 23.589 31.0509 0.066568 0.99548
+DFOP 9 5 23.589 4.3627 0.026621 0.99936
>
|