Skip to content

Bugs of test_pred2.R #16

@Naoaki-H

Description

@Naoaki-H

When I run test_pred2.R, there are bugs like this.

out2 <- bcf::bcf(y               = y,
                  z               = z,
                  x_control       = x,
                  x_moderate      = x,
                  pihat           = pi,
                  nburn           = n_burn,
                  nsim            = n_sim,
                  w               = weights,
                  n_chains        = 2,
                  nthin           = 3,
                  update_interval = 1)

Error in bcf::bcf(y = y, z = z, x_control = x, x_moderate = x, pihat = pi, : unused arguments (w = weights, n_chains = 2)

By following the message, and removing the arguments w and n_chains, it worked.

However, next problem happened;

pred_out = predict(object=out2,
                    x_predict_control=x,
                    x_predict_moderate=x,
                    pi_pred=pi,
                    z_pred=z,
                    save_tree_directory = '..')

Error message: Error in UseMethod("predict") : no applicable method for 'predict' applied to an object of class "c('double', 'numeric')"

Since I don't have any idea to fix this error, I'm bothered with this bug.

How should we do?

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