From b2cbfc35e4c2b3f8dbb2e9d83ab1f4b358427896 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 14 Sep 2018 17:20:20 +0200 Subject: Update NEWS Static documentation rebuilt by pkgdown --- R/mkinfit.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'R/mkinfit.R') 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'.") -- cgit v1.2.1