Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better feedback when there's an intervention type error #98

Open
nt-williams opened this issue Jul 20, 2021 · 1 comment
Open

Comments

@nt-williams
Copy link
Owner

Capture this error message and indicate setting intervention_type = "mtp" will likely fix it.

Error in glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  :            
  object 'fit' not found
@kathoffman
Copy link
Collaborator

I've noticed this error also occurs if static_binary_* is accidentally used with a numerical treatment. Perhaps this could be incorporated into suggestions for the user to debug?

Reprex is the same as Example 4.1 in ?lmtp_tmle, with only the shift changed from NULL to static_binary_on.

library(lmtp)

A <- c("A1", "A2")
L <- list(c("L1"), c("L2"))
C <- c("C1", "C2")
Y <- "Y"

progressr::with_progress(
  lmtp_tmle(data = sim_cens, 
            A,
            time_vary = L, 
            Y,
            cens = C, 
            shift = static_binary_on,
            folds = 2)
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants