Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 1, 2024
1 parent 032d193 commit 1318d54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/find_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ find_parameters.brmultinom <- find_parameters.multinom
find_parameters.multinom_weightit <- function(x, flatten = FALSE, ...) {
params <- stats::coef(x)
resp <- gsub("(.*)~(.*)", "\\1", names(params))
pars <- gsub("(.*)~(.*)", "\\2", names(params))[resp == resp[1]]
pars <- list(conditional = gsub("(.*)~(.*)", "\\2", names(params))[resp == resp[1]])

if (flatten) {
unique(unlist(pars, use.names = FALSE))
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-weightit.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ w.out <- WeightIt::weightit(
)
set.seed(123)
fit3 <- WeightIt::lm_weightit(
re78 ~ treat + age + educ, data = lalonde,
re78 ~ treat + age + educ,
data = lalonde,
weightit = w.out,
vcov = "FWB",
R = 50, #should use way more
R = 50, # should use way more
fwb.args = list(wtype = "mammen")
)

Expand Down

0 comments on commit 1318d54

Please sign in to comment.