View source: R/predict.BayesSUR.R
predict.BayesSUR | R Documentation |
BayesSUR
Predict responses corresponding to the posterior mean of the coefficients,
return posterior mean of coefficients or indices of nonzero coefficients of
a BayesSUR
class object.
## S3 method for class 'BayesSUR'
predict(object, newx, type = "response", beta.type = "marginal", Pmax = 0, ...)
object |
an object of class |
newx |
Matrix of new values for x at which predictions are to be made |
type |
Type of prediction required. |
beta.type |
the type of estimated coefficients beta for prediction.
Default is |
Pmax |
If |
... |
other arguments |
Predicted values extracted from an object of class BayesSUR
.
If the BayesSUR
specified data standardization, the fitted values
are base based on standardized data.
data("exampleEQTL", 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 = 20, burnin = 10, nChains = 1, gammaPrior = "hotspot",
hyperpar = hyperpar, tmpFolder = "tmp/"
)
## check prediction
predict.val <- predict(fit, newx = exampleEQTL[["blockList"]][[2]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.