Skip to content

Commit

Permalink
use new narm argument
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 9, 2024
1 parent 5f32a38 commit 29baa97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,4 @@ Config/testthat/edition: 3
Config/testthat/parallel: true
Config/Needs/website: easystats/easystatstemplate
Config/rcmdcheck/ignore-inconsequential-notes: true
Remotes: easystats/insight
4 changes: 2 additions & 2 deletions R/standardize_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ standardize_info.default <- function(model,
# model_matrix <- as.data.frame(stats::model.matrix(model))
model_matrix <- as.data.frame(insight::get_modelmatrix(model))
model_data <- insight::get_data(model, source = "mf", verbose = FALSE)
wgts <- insight::get_weights(model, na_rm = TRUE)
wgts <- insight::get_weights(model, remove_na = TRUE)

# validation check for ZI
if (mi$is_zero_inflated && verbose) {
Expand Down Expand Up @@ -428,7 +428,7 @@ standardize_info.default <- function(model,

within_vars <- unclass(performance::check_heterogeneity_bias(model))
id <- insight::get_random(model)[[1]]
w <- insight::get_weights(model, na_rm = TRUE)
w <- insight::get_weights(model, remove_na = TRUE)

## Find which parameters vary on level 1 ("within")
is_within <- logical(length = length(params))
Expand Down
2 changes: 1 addition & 1 deletion R/utils_model_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

# weighted nobs
weighted_nobs <- .safe({
w <- insight::get_weights(model, na_rm = TRUE, null_as_ones = TRUE)
w <- insight::get_weights(model, remove_na = TRUE, null_as_ones = TRUE)
round(sum(w))
})
attr(params, "weighted_nobs") <- weighted_nobs
Expand Down

0 comments on commit 29baa97

Please sign in to comment.