BayesC TWAS weights (rounded-spike prior)
Source:R/regularizedRegressionWrappers.R
bayesCWeights.RdUse a rounded spike prior (low-variance Gaussian).
Usage
bayesCWeights(
X,
y,
Z = NULL,
pi = 0.1,
h2 = NULL,
nit = 5000,
nburn = 1000,
nthin = 5,
methodArgs = QggOptions()
)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.- h2
Numeric or
NULL. Prior heritability;NULLleaves the engine's own default.- nit
Integer. Total MCMC iterations. Default
5000.- nburn
Integer. Burn-in iterations. Default
1000.- nthin
Integer. Thinning interval for retained MCMC samples. Default
5.- methodArgs
Options forwarded to
qgg::gbayes, built withQggOptions. A bare list is refused: it cannot be checked against the engine, so a misspelled option would be silently ignored.
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] -5.884592e-03 -5.791870e-03 1.198015e-03 -3.040642e-03 -6.072188e-05
#> [6] -3.329197e-03 -1.214103e-03 6.354900e-03 3.756463e-03 3.957296e-04
#> [11] -3.658074e-03 -3.844207e-03 -3.120776e-03 1.816600e-03 -2.381331e-03
#> [16] 8.854182e-03 -9.915386e-05 -1.278181e-03 1.033847e-02 1.762544e-03
#> [21] -3.620562e-03 -8.827520e-04 -4.046530e-03 -8.590346e-04 -1.017868e-03
#> [26] -2.293299e-03 -1.899420e-02 -2.871092e-03 6.695803e-03 1.873417e-03