Skip to content

show inference for pi in print.summary.varbvs #24

Description

@timflutre

As you say in your paper that the inference for pi is quite accurate (compare to full MCMC), I think it would be of interest to show it in the output of print.summary.varbvs. For that, if I'm not wrong, I think one could add the following commands, for instance just before the line "Selected variables by probability cutoff":

(pi.hat <- 10^(out$logodds$x0) / (1 + 10^(out$logodds$x0)))
(pi.hat.low <- 10^(out$logodds$a) / (1 + 10^(out$logodds$a)))
(pi.hat.high <- 10^(out$logodds$b) / (1 + 10^(out$logodds$b)))

and then:

cat("pi: ")
cat(sprintf("%0.3f [%0.3f,%0.3f]\n", pi.hat, pi.hat.low, pi.hat.high))

What do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions