aboutsummaryrefslogtreecommitdiff
path: root/R/mkinfit.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2018-09-14 17:20:20 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2018-09-14 17:45:46 +0200
commitb2cbfc35e4c2b3f8dbb2e9d83ab1f4b358427896 (patch)
tree65e737d3d79cc5875f18822e1cbc26a680b9a244 /R/mkinfit.R
parent70d158c4dd919f4f77bc12f8ace333d29d249b79 (diff)
Update NEWS
Static documentation rebuilt by pkgdown
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r--R/mkinfit.R6
1 files changed, 4 insertions, 2 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 2c4e3268..dec55a4e 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -415,8 +415,10 @@ mkinfit <- function(mkinmod, observed,
# We need unweighted residuals to update the weighting
cost_tmp <- cost(fit$par)
- p_tmp <- cor.test(abs(cost_tmp$residuals$res.unweighted),
- cost_tmp$residuals$obs, method = "kendall")$p.value
+ # We need to supress warnings as we may have ties
+ p_tmp <- suppressWarnings(cor.test(abs(cost_tmp$residuals$res.unweighted),
+ cost_tmp$residuals$obs, method = "kendall")$p.value)
+
if (p_tmp > 0.1) {
stop("No correlation of absolute residuals with observed values found.\n",
"Try without reweighting or with reweight.method = 'obs'.")

Contact - Imprint