aboutsummaryrefslogtreecommitdiff
path: root/R/mkinfit.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2019-04-24 21:03:43 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2019-04-24 21:19:52 +0200
commit380a29e81f88cd80c9c6915200ddc7054c8a085a (patch)
tree93816c95c6bc1604a6edd24ce2617dba54a44fb3 /R/mkinfit.R
parent129ff33d91bbea9a90b11f8230b78493eba45fe3 (diff)
Improve output and update tests
Remove skipped tests as I do not intend to reactivate them
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r--R/mkinfit.R14
1 files changed, 9 insertions, 5 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 55b57aa6..754e72b8 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -327,7 +327,8 @@ mkinfit <- function(mkinmod, observed,
if (nlogLik < nlogLik.current) {
assign("nlogLik.current", nlogLik, inherits = TRUE)
- if (!quiet) cat("Negative log-likelihood at call ", calls, ": ", nlogLik.current, "\n", sep = "")
+ if (!quiet) cat(ifelse(OLS, "Sum of squared residuals", "Negative log-likelihood"),
+ " at call ", calls, ": ", nlogLik.current, "\n", sep = "")
}
return(nlogLik)
}
@@ -593,6 +594,7 @@ summary.mkinfit <- function(object, data = TRUE, distimes = TRUE, alpha = 0.05,
use_of_ff = object$mkinmod$use_of_ff,
df = c(p, rdf),
cov.unscaled = covar,
+ err_mod = object$err_mod,
#cov.scaled = covar * resvar,
niter = object$iterations,
calls = object$calls,
@@ -657,11 +659,13 @@ print.summary.mkinfit <- function(x, digits = max(3, getOption("digits") - 3), .
cat("\nModel predictions using solution type", x$solution_type, "\n")
- cat("\nFitted with method", x$method.modFit,
- "using", x$calls, "model solutions performed in", x$time[["elapsed"]], "s\n")
+ cat("\nFitted using", x$calls, "model solutions performed in", x$time[["elapsed"]], "s\n")
cat("\nError model:\n")
- print(x$err_mod)
+ cat(switch(x$err_mod,
+ const = "Constant variance",
+ obs = "Variance unique to each observed variable",
+ tc = "Two-component variance function"), "\n")
cat("\nStarting values for parameters to be optimised:\n")
print(x$start)
@@ -696,7 +700,7 @@ print.summary.mkinfit <- function(x, digits = max(3, getOption("digits") - 3), .
print(signif(x$bpar[, c(1, 3, 4, 5, 6)], digits = digits))
}
- cat("\nChi2 error levels in percent:\n")
+ cat("\nFOCUS Chi2 error levels in percent:\n")
x$errmin$err.min <- 100 * x$errmin$err.min
print(x$errmin, digits=digits,...)

Contact - Imprint