From 6da102ae3ab639551dc6d70d1820249a9fc64a00 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 17 Dec 2024 22:03:26 +0100 Subject: [PATCH] fix --- R/rescale_weights.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/rescale_weights.R b/R/rescale_weights.R index f74705312..d18bdac0e 100644 --- a/R/rescale_weights.R +++ b/R/rescale_weights.R @@ -127,7 +127,7 @@ rescale_weights <- function(data, by, probability_weights, nest = FALSE, method # rescale weights, method Carle ---------------------------- .rescale_weights_kish <- function(probability_weights, data_tmp, data, weight_non_na) { - weights <- mean(data_tmp[[probability_weights]]) + weights <- data_tmp[[probability_weights]] # design effect according to Kish deff <- mean(weights^2) / (mean(weights)^2) # rescale weights, so their mean is 1