BayesA TWAS weights (t-distribution prior)
Source:R/regularizedRegressionWrappers.R
bayesAWeights.RdUse t-distribution as prior.
Usage
bayesAWeights(
X,
y,
Z = NULL,
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.- 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
bayesAWeights(X, y)
#> Type of analysis performed: st-blr-individual-level-dense-ld
#> [1] -0.065038400 -0.064721426 0.021706693 -0.003878998 -0.009051476
#> [6] -0.014767369 -0.007054643 0.055613170 0.022264242 0.022203763
#> [11] -0.016286800 -0.069228346 -0.023177103 0.027962285 -0.010926378
#> [16] 0.055226534 -0.008473986 -0.014885737 0.016963190 -0.006848259
#> [21] -0.005971904 -0.017227759 -0.011279069 -0.008267544 -0.028986622
#> [26] -0.021151352 -0.077751321 -0.010151363 0.036093338 0.011092512