Skip to contents

Use Gaussian distribution as prior. Posterior means will be BLUP, equivalent to Ridge Regression.

Usage

bayesNWeights(X, y, Z = NULL, ...)

Arguments

X

Numeric genotype / design matrix (samples x variants).

y

Numeric response (phenotype) vector of length nrow(X).

Z

Optional numeric matrix of fixed-effect covariates, or NULL.

...

Additional arguments forwarded to bayesAlphabetWeights / qgg.

Value

A numeric vector of effect-size weights, one per variant (column of X); columns dropped for zero variance receive weight 0.

Examples

data(eqtlRegionExample)
X <- eqtlRegionExample$X[, 1:30]
y <- eqtlRegionExample$yRes
bayesNWeights(X, y)
#> Type of analysis performed: st-blr-individual-level-dense-ld
#>  [1] -0.037854789 -0.042715960  0.017905419 -0.005210823 -0.004161255
#>  [6] -0.010367863 -0.009477432  0.027948498  0.010857778  0.014268014
#> [11] -0.006151401 -0.042695201 -0.012064846  0.013227878 -0.009947849
#> [16]  0.029715558 -0.005988256 -0.008688128  0.008032079 -0.008767836
#> [21] -0.007159427 -0.013356979 -0.008012620 -0.003102946 -0.014302124
#> [26] -0.011974399 -0.038864232 -0.009004044  0.014871518  0.013160897