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

plot_moderator functions #2

Open
eteitelbaum opened this issue Sep 27, 2024 · 1 comment
Open

plot_moderator functions #2

eteitelbaum opened this issue Sep 27, 2024 · 1 comment

Comments

@eteitelbaum
Copy link

eteitelbaum commented Sep 27, 2024

Hi,

Thanks for the awesome package. I am having some problems getting plot_moderator_d() and plot_moderator_c_bin() to work. I am getting an error that says:

Error in plot_moderator_d(model_results, lalonde$educ) : 
  could not find function "plot_moderator_d"

For a reprex, I am just using the example from the documentation:

library(bartCause)
library(plotBart)

data(lalonde)
confounders <- c('age', 'educ', 'black', 'hisp', 'married', 'nodegr')
model_results <- bartCause::bartc(
 response = lalonde[['re78']],
 treatment = lalonde[['treat']],
 confounders = as.matrix(lalonde[, confounders]),
 estimand = 'ate',
 commonSuprule = 'none'
)
plot_moderator_d(model_results, lalonde$educ)
@joemarlo
Copy link
Member

Hi - I don't believe @gperrett has pushed these functions to CRAN yet so you'll need to use the GitHub version of the package:

install.packages("remotes")
remotes::install_github('priism-center/plotBart')

Or, if you wish to continue using the CRAN version, you can use the plot_moderator_d_density() and plot_moderator_d_linerange() functions.

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