Extracts coefficients from an existing SuSiE-inf fit or fits `susieR::susie()` with `unmappable_effects = "inf"`.
Usage
susieInfWeights(
X = NULL,
y = NULL,
susieInfFit = NULL,
fitRetention = c("none", "slim", "full")
)Arguments
- X
Optional genotype matrix; when supplied it is only used to check that the fit covers the same number of variants.
- y
Unused; retained for signature compatibility.
- susieInfFit
Optional fitted SuSiE-inf object.
- fitRetention
How much of the fit is kept on the returned weights:
"none"attaches nothing,"slim"and"full"attach it as the"fit"attribute. These extractors hold no trimmable intermediates, so the two retaining levels behave alike here.
Non-zero weights with zero PIPs
SuSiE-inf decomposes effects into a mappable component (driven by `alpha * mu`, reported as per-variant PIPs) and an infinitesimal component (driven by `theta`). When the fit converges with no mappable effects – all `V` and `mu` zero, so every `pip == 0` – the returned weights are still non-zero because `susieR::coef.susie` adds `theta / X_column_scale_factors` to the mappable coefficient. This is intentional: it captures diffuse polygenic signal that the mappable component could not localize to any credible set. Consumers that interpret per-variant PIPs as a gate on whether to use the weights should be aware that low or zero PIPs do not imply zero TWAS weights here.
Examples
data(eqtlRegionExample)
X <- eqtlRegionExample$X[, 1:30]
y <- eqtlRegionExample$yRes
fit <- susieR::susie(X, y, L = 5)
#> HINT: nrow(X) = 415 >= 2 * ncol(X) = 60. Consider precomputing sufficient statistics with compute_suff_stat() and fitting with susie_ss() instead -- this avoids holding X in memory at every iteration and lets you reuse XtX across multiple y.
susieInfWeights(susieInfFit = fit)
#> [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0