BayesC TWAS weights (rounded-spike prior)
Source:R/regularizedRegressionWrappers.R
bayesCWeights.RdUse a rounded spike prior (low-variance Gaussian).
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.- pi
Numeric in (0, 1). Prior proportion of non-null effects for the BayesC mixture. Default
0.1.- ...
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
bayesCWeights(X, y)
#> Type of analysis performed: st-blr-individual-level-dense-ld
#> [1] -6.062337e-03 -6.303635e-03 9.766574e-04 -3.031176e-03 -7.840823e-04
#> [6] -3.266466e-03 -1.837009e-03 6.628204e-03 3.840737e-03 7.850173e-04
#> [11] -1.232330e-03 -3.948358e-03 -2.699437e-03 1.302681e-03 -2.273051e-03
#> [16] 9.277720e-03 -3.607041e-05 -1.323504e-03 6.528830e-03 1.991301e-03
#> [21] -3.943260e-03 -1.175765e-03 -4.121400e-03 -4.146699e-04 -6.881103e-04
#> [26] -2.497057e-03 -1.791950e-02 -3.388903e-03 7.565189e-03 1.931224e-03