predict.sbr: Function predict.sbr

Description Usage Arguments Value Author(s) References See Also Examples

Description

Predict S3 method for objects of class 'sbr'.

Usage

1
2
## S3 method for class 'sbr'
predict(object, newdata, coef = "sbr")

Arguments

object

an object of class 'sbr'.

newdata

a (standardized) data matrix from which to predict.

coef

choose whether to use the SBR beta estimates (default option "sbr") or the SSBR beta estimates (option "ssbr").

Value

Returns a vector of predictions.

Author(s)

Konstanstinos Perrakis konstantinos.perrakis@dzne.de

Sach Mukherjee sach.mukherjee@dzne.de

References

Perrakis, K., Mukherjee, S. and the Alzheimers Disease Neuroimaging Initiative. (2018) Scalable Bayesian regression in high dimensions with multiple data sources. https://arxiv.org/pdf/1710.00596.pdf

See Also

predict

Examples

1
2
3
4
5
6
y <- rnorm(100)
X <- matrix(rnorm(100*300), 100, 300)
G <- gram(X)
model <- sbr(y = y, X = X, G = G, sparsify = TRUE)
predict1 <- predict(model, X[1:10, ], coef = 'sbr')
predict2 <- predict(model, X[1:10, ], coef = 'ssbr')

kperrakis/sbr documentation built on May 21, 2019, 10:48 a.m.