From e449c531119ad5bf45072027f97bf54050140526 Mon Sep 17 00:00:00 2001 From: Alex Strashny Date: Thu, 29 Feb 2024 10:37:09 -0500 Subject: [PATCH] . --- R/z_deffK.R | 8 +++++--- docs/pkgdown.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/R/z_deffK.R b/R/z_deffK.R index a838da4..d0d5139 100644 --- a/R/z_deffK.R +++ b/R/z_deffK.R @@ -15,8 +15,10 @@ deffK = function(prob) # if (any(w <= 0)) # warning("Some weights are less than or equal to 0.\n") - n <- length(w) - ret = 1 + sum((w - mean(w))^2)/n/mean(w)^2 - assert_that(all(ret > 0)) + # n <- length(w) + # ret = 1 + sum((w - mean(w))^2)/n/mean(w)^2 + ret = 1 + mean((w - mean(w))^2)/mean(w)^2 + # assert_that(all(ret > 0)) + assert_that(all(ret >= 1)) # Second term >= 0 ret } diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 46a26af..4d9fb7f 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: Example-National-Ambulatory-Medical-Care-Survey-NAMCS-tables: Example-National-Ambulatory-Medical-Care-Survey-NAMCS-tables.html surveytable: surveytable.html -last_built: 2024-02-29T02:56Z +last_built: 2024-02-29T15:32Z urls: reference: https://cdcgov.github.io/surveytable/reference article: https://cdcgov.github.io/surveytable/articles