Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 17, 2024
1 parent a55625d commit 6da102a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/rescale_weights.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]]

Check warning on line 130 in R/rescale_weights.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/rescale_weights.R,line=130,col=3,[object_overwrite_linter] 'weights' is an exported object from package 'stats'. Avoid re-using such symbols.

Check warning on line 130 in R/rescale_weights.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/rescale_weights.R,line=130,col=3,[object_overwrite_linter] 'weights' is an exported object from package 'stats'. Avoid re-using such symbols.
# design effect according to Kish
deff <- mean(weights^2) / (mean(weights)^2)
# rescale weights, so their mean is 1
Expand Down

0 comments on commit 6da102a

Please sign in to comment.