BayesSUR (version 2.1-7)

coef.BayesSUR: coef method for class BayesSUR

Description

Extract the posterior mean of the coefficients of a BayesSUR class object

Usage

# S3 method for BayesSUR
coef(object, beta.type = "marginal", Pmax = 0, ...)

Value

Estimated coefficients are from an object of class BayesSUR. If the BayesSUR specified data standardization, the fitted values are base based on standardized data.

Arguments

object

an object of class BayesSUR

beta.type

type of output beta. Default is marginal, giving marginal beta estimation. If beta.type="conditional", it gives beta estimation conditional on gamma=1.

Pmax

If Pmax=0.5 and beta.type="conditional", it gives median probability model betas. Default is 0.

...

other arguments

Examples

Run this code
data("exampleQTL", package = "BayesSUR")
hyperpar <- list(a_w = 2, b_w = 5)

set.seed(9173)
fit <- BayesSUR(
  Y = exampleEQTL[["blockList"]][[1]],
  X = exampleEQTL[["blockList"]][[2]],
  data = exampleEQTL[["data"]], outFilePath = tempdir(),
  nIter = 10, burnin = 0, nChains = 1, gammaPrior = "hotspot",
  hyperpar = hyperpar, tmpFolder = "tmp/"
)

## check prediction
beta.hat <- coef(fit)

Run the code above in your browser using DataLab