Closed IndrajeetPatil closed 3 years ago
The following example in datawizard is broken with the said error and just wanted to make sure that sjstats update will be fixing it: https://easystats.github.io/datawizard/reference/rescale_weights.html
datawizard
sjstats
if (require("sjstats")) { data(nhanes_sample, package = "sjstats") head(rescale_weights(nhanes_sample, "SDMVSTRA", "WTINT2YR")) # also works with multiple group-variables... head(rescale_weights(nhanes_sample, c("SDMVSTRA", "SDMVPSU"), "WTINT2YR")) # or nested structures. x <- rescale_weights( data = nhanes_sample, group = c("SDMVSTRA", "SDMVPSU"), probability_weights = "WTINT2YR", nest = TRUE ) head(x) } #> Loading required package: sjstats #> Error: package or namespace load failed for ‘sjstats’: #> object ‘rescale_weights’ is not exported by 'namespace:parameters' if (require("lme4") && require("sjstats")) { data(nhanes_sample, package = "sjstats") nhanes_sample <- rescale_weights(nhanes_sample, "SDMVSTRA", "WTINT2YR") glmer( total ~ factor(RIAGENDR) * (log(age) + factor(RIDRETH1)) + (1 | SDMVPSU), family = poisson(), data = nhanes_sample, weights = pweights_a ) } #> Loading required package: lme4 #> Loading required package: Matrix #> Loading required package: sjstats #> Error: package or namespace load failed for ‘sjstats’: #> object ‘rescale_weights’ is not exported by 'namespace:parameters'
The following example in
datawizard
is broken with the said error and just wanted to make sure thatsjstats
update will be fixing it: https://easystats.github.io/datawizard/reference/rescale_weights.html