aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-10-06 20:17:17 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2014-10-06 20:17:17 +0200
commit45942cc099c258fa07f42691cf2e2ee163f3b6d6 (patch)
treea0ee54f4368a4042e58b0cdb6b4665ad03836c3e /R
parentdb8b6a43fec8d052b853f272e016079d0a9f91b6 (diff)
Avoid a warning produced by initial fits in gmkin
Diffstat (limited to 'R')
-rw-r--r--R/mkinfit.R16
1 files changed, 9 insertions, 7 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 0f488ec8..5c1de846 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -594,13 +594,15 @@ print.summary.mkinfit <- function(x, digits = max(3, getOption("digits") - 3), .
cat("\nOptimised, transformed parameters:\n")
print(signif(x$par, digits = digits))
- cat("\nParameter correlation:\n")
- if (!is.null(x$cov.unscaled)){
- Corr <- cov2cor(x$cov.unscaled)
- rownames(Corr) <- colnames(Corr) <- rownames(x$par)
- print(Corr, digits = digits, ...)
- } else {
- cat("Could not estimate covariance matrix; singular system:\n")
+ if (x$niter != 0) {
+ cat("\nParameter correlation:\n")
+ if (!is.null(x$cov.unscaled)){
+ Corr <- cov2cor(x$cov.unscaled)
+ rownames(Corr) <- colnames(Corr) <- rownames(x$par)
+ print(Corr, digits = digits, ...)
+ } else {
+ cat("Could not estimate covariance matrix; singular system:\n")
+ }
}
cat("\nResidual standard error:",

Contact - Imprint