Skip to contents

Use a hierarchical Bayesian mixture model with four Gaussian components. Variances are scaled by 0, 0.0001, 0.001, and 0.01.

Usage

bayesRWeights(
  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; NULL leaves 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 with QggOptions. 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
bayesRWeights(X, y)
#> Type of analysis performed: st-blr-individual-level-dense-ld
#>  [1] -0.0110859246 -0.0120299433  0.0006622137 -0.0005197018 -0.0003874410
#>  [6] -0.0045253522 -0.0015580848  0.0132841943 -0.0013589591  0.0026260728
#> [11] -0.0063042107 -0.0065474509 -0.0019332707  0.0046898677 -0.0001720976
#> [16]  0.0100426303 -0.0012708035 -0.0025448194  0.0112186248 -0.0007910698
#> [21] -0.0212127032 -0.0024030621  0.0189884163 -0.0002188602 -0.0056228145
#> [26] -0.0100160670 -0.0316140538 -0.0028574732  0.0097631703  0.0020388932