Sum of Single Effects Regression using the RSS-lambda likelihood
Source:R/susie.R
susie_rss_lambda.RdSpecialized interface for the regularized eigendecomposition RSS likelihood of Zou et al. (2022). This path accepts a single reference matrix or a single factor matrix and does not support multi-panel mixture, finite-reference inflation, or R-mismatch correction.
Usage
susie_rss_lambda(
z = NULL,
R = NULL,
n = NULL,
X = NULL,
L = min(10, if (!is.null(R)) ncol(R) else ncol(X)),
lambda,
maf = NULL,
maf_thresh = 0,
prior_variance = 50,
residual_variance = NULL,
prior_weights = NULL,
null_weight = 0,
intercept_value = 0,
estimate_residual_variance = FALSE,
estimate_residual_method = "MLE",
estimate_prior_variance = TRUE,
estimate_prior_method = c("optim", "EM", "simple"),
prior_variance_grid = NULL,
mixture_weights = NULL,
check_null_threshold = 0,
prior_tol = 1e-09,
residual_variance_lowerbound = 0,
model_init = NULL,
coverage = 0.95,
min_abs_corr = 0.5,
max_iter = NULL,
L_greedy = NULL,
greedy_lbf_cutoff = 0.1,
tol = NULL,
convergence_method = c("elbo", "pip"),
verbose = FALSE,
track_fit = FALSE,
check_prior = TRUE,
check_R = TRUE,
check_z = FALSE,
n_purity = 100,
r_tol = 1e-08,
refine = FALSE,
init_only = FALSE,
slot_prior = NULL
)Arguments
- z
A p-vector of z-scores.
- R
A p by p correlation matrix. Exactly one of
RorXmust be provided.- n
The sample size, not required but recommended.
- X
Optional factor matrix (B by p) such that
R = crossprod(X) / nrow(X)approximates the correlation matrixR. The RSS-lambda path always builds the eigen decomposition via SVD of standardizedX; there is no separate low-rank branch. Provide eitherRorX, not both.- L
Maximum number of non-zero effects in the model. If L is larger than the number of covariates, p, L is set to p.
- lambda
Regularization parameter for the RSS-lambda likelihood. Must be supplied.
lambda = "estimate"estimates lambda from the null-space residual.- maf
A p-vector of minor allele frequencies; to be used along with
maf_threshto filter input summary statistics.- maf_thresh
Variants with MAF smaller than this threshold are not used.
- prior_variance
Prior variance for each non-zero effect on the z-score scale. Replaces
scaled_prior_variancefromsusie_rss. Default50.- residual_variance
Residual variance on the RSS-lambda scale. If
NULL, it is initialized to1 - lambda; if supplied, the working residual variance isresidual_variance - lambda.- prior_weights
A vector of length p, in which each entry gives the prior probability that corresponding column of X has a nonzero effect on the outcome, y. The weights are internally normalized to sum to 1. When
NULL(the default), uniform prior weights are used (each variable is assigned probability1/p).- null_weight
Prior probability of no effect (a number between 0 and 1, and cannot be exactly 1).
- intercept_value
Intercept used by the RSS-lambda likelihood. Default
0.- estimate_residual_variance
If
TRUE, estimate the RSS-lambda residual variance by maximum likelihood.- estimate_residual_method
Variance-component estimator. The RSS-lambda path supports
"MLE"only; any other value errors.- estimate_prior_variance
If
estimate_prior_variance = TRUE, the prior variance is estimated (a separate parameter for each of the L effects). WhenTRUE,prior_varianceprovides the initial value; whenFALSE, it is held fixed.- estimate_prior_method
The method used for estimating prior variance. When
estimate_prior_method = "simple"is used, the likelihood at the specified prior variance is compared to the likelihood at a variance of zero, and the setting with the larger likelihood is retained. Whenprior_variance_gridis provided, this is automatically set to"fixed_mixture".- prior_variance_grid
Numeric vector of K prior variances defining a mixture-of-normals prior on effect sizes. When provided, the SER evaluates Bayes factors at each grid point and forms a mixture BF weighted by
mixture_weights. This bypasses the scalar prior variance optimization. Default isNULL(standard scalar V path).- mixture_weights
Numeric vector of K non-negative weights summing to 1, giving the mixture proportions for the variance grid. Default is
NULL, which uses uniform weights whenprior_variance_gridis provided.- check_null_threshold
When the prior variance is estimated, compare its likelihood to the likelihood at zero and use zero unless the larger value exceeds it by at least
check_null_threshold.0(default) takes the larger likelihood at face value.- prior_tol
When the prior variance is estimated, compare the estimated value to
prior_tolat the end of the computation, and exclude a single effect from PIP computation if the estimated prior variance is smaller than this tolerance value.- residual_variance_lowerbound
Lower limit on the estimated residual variance. It is only relevant when
estimate_residual_variance = TRUE.- model_init
A previous susie fit with which to initialize.
- coverage
A number between 0 and 1 specifying the “coverage” of the estimated confidence sets.
- min_abs_corr
Minimum absolute correlation allowed in a credible set. The default, 0.5, corresponds to a squared correlation of 0.25, which is a commonly used threshold for genotype data in genetic studies. This "purity" filter is applied to the CSs reported in the fit object, so the CS list returned here may be a subset of the one produced by calling
susie_get_cson the same fit without passingXorXcorr(in which case the purity filter is skipped).- max_iter
Maximum number of IBSS iterations to perform. For
susie_rss()andsusie_rss_lambda(),NULLuses50with a hint; other interfaces use100.- L_greedy
Integer or
NULL. When non-NULL, run a greedy outer loop that grows the number of effects fromL_greedyup toLin linear steps until the fit saturates. The defaultNULLruns the usual fixed-Lfit.- greedy_lbf_cutoff
Numeric saturation threshold for the
L_greedyouter loop. Default is 0.1.- tol
A small, non-negative number specifying the convergence tolerance for the IBSS fitting procedure. When
NULL, the default is1e-4; forestimate_residual_method = "NIG", the default is tightened to1e-6.- convergence_method
When
converge_method = "elbo"the fitting procedure halts when the difference in the variational lower bound, or “ELBO” (the objective function to be maximized), is less thantol. Whenconverge_method = "pip"the fitting procedure halts when the maximum absolute difference inalphais less thantol.- verbose
If
verbose = TRUE, the algorithm's progress, a summary of the optimization settings, and refinement progress (ifrefine = TRUE) are printed to the console.- track_fit
If
track_fit = TRUE, a compactsusie_trackobject is returned intrace, containing alpha history, effect summaries and available diagnostics at each iteration of the IBSS fitting procedure.- check_prior
If
check_prior = TRUE, it checks if the estimated prior variance becomes unreasonably large (comparing with 10 * max(abs(z))^2).- check_R
If TRUE, verify that
Ris positive semidefinite.- check_z
If TRUE, verify that
zlies in the column space ofR.- n_purity
Passed as argument
n_puritytosusie_get_cs.- r_tol
Tolerance level for eigenvalue check of positive semidefinite matrix
XtX.- refine
If
refine = TRUE, then an additional iterative refinement procedure is used, after the IBSS algorithm, to check and escape from local optima (see details).- init_only
Logical. If
TRUE, return a list withdataandparamsobjects without running the IBSS algorithm. Default isFALSE.- slot_prior
Optional slot activity prior created by
slot_prior_betabinomorslot_prior_poisson. Useslot_prior_betabinom(a_beta, b_beta)for the usual single-locus setting; it places a Beta-Binomial prior on the number of active effects and gives an adaptive multiplicity correction. Useslot_prior_poisson(C, nu)when you want a Gamma-Poisson prior centered on an expected numberCof active effects. When supplied, each single-effect slot has an estimated activity probabilityc_hat; fitted values and PIPs are weighted by these activity probabilities, and convergence is checked usingconvergence_method = "pip".