predict.BayesSUR {BayesSUR}R Documentation

predict method for class 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, ...)



an object of class BayesSUR


Matrix of new values for x at which predictions are to be made. Must be a matrix


Type of prediction required. type="response" gives the fitted responses; type="coefficients" returns the estimated coefficients depending on the arguments beta.type and Pmax. type="nonzero" returns a list of the indices of the nonzero coefficients corresponding to the estimated latent indicator variable thresholding at Pmax


the type of estimated coefficients beta for prediction. Default is marginal, giving marginal beta estimation. If beta.type="conditional", it gives conditional beta estimation


If type="nonzero", it is a threshold for the estimated latent indicator variable. If type="coefficients", beta.type="conditional" and Pmax=0.5, it gives median probability model betas. Default is 0


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 )

fit <- BayesSUR(Y = exampleEQTL[["blockList"]][[1]], 
                X = exampleEQTL[["blockList"]][[2]],
                data = exampleEQTL[["data"]], outFilePath = tempdir(),
                nIter = 100, burnin = 50, nChains = 2, gammaPrior = "hotspot",
                hyperpar = hyperpar, tmpFolder = "tmp/" )

## check prediction
predict.val <- predict(fit, newx=exampleEQTL[["blockList"]][[2]])

[Package BayesSUR version 2.0-1 Index]