Skip to content

New error when using weightit argument #85

@strengejacke

Description

@strengejacke

The following example used to work, but now fails. Do you have any ideas, why?

data("lalonde", package = "cobalt")

# Logistic regression ATT weights
w.out <- WeightIt::weightit(
  treat ~ age + educ + married + re74,
  data = lalonde,
  method = "glm",
  estimand = "ATT"
)
set.seed(123)
fit3 <- WeightIt::lm_weightit(
  re78 ~ treat + age + educ,
  data = lalonde,
  weightit = w.out,
  vcov = "FWB",
  R = 50, # should use way more
  fwb.args = list(wtype = "mammen")
)
#> Error in `WeightIt::lm_weightit()`:
#> ! The supplied `weightit` object does not appear to be the result of a
#> call to `weightit()` or `weightitMSM()`, so bootstrapping cannot be
#> used.

Created on 2025-09-19 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions