Estimates cTWAS parameters using EM with cTWAS SER model
Source:R/ctwas_est_parameters.R
est_param.RdEstimates cTWAS parameters using EM with cTWAS SER model
Usage
est_param(
region_data,
init_group_prior = NULL,
init_group_prior_var = NULL,
group_prior_var_structure = c("shared_all", "shared_type", "shared_context",
"shared_nonSNP", "independent", "fixed"),
niter_prefit = 3,
niter = 50,
min_var = 2,
min_gene = 1,
min_group_size = 100,
min_p_single_effect = 0.8,
null_method = c("ctwas", "susie", "none"),
EM_tol = 1e-04,
force_run_niter = FALSE,
ncore = 1,
logfile = NULL,
verbose = FALSE
)Arguments
- region_data
a list object indexing regions, variants and genes.
- init_group_prior
a vector of initial values of prior inclusion probabilities for different groups.
- init_group_prior_var
a vector of initial values of prior variances for different groups.
- group_prior_var_structure
a string indicating the structure to put on the prior variance parameters. "shared_all" allows all groups to share the same variance parameter. "shared_type" allows all groups in one molecular QTL type to share the same variance parameter. "shared_context" allows all groups in one context (tissue, cell type, condition) to share the same variance parameter. "shared_nonSNP" allows all non-SNP groups to share the same variance parameter. "independent" allows all groups to have their own separate variance parameters. "fixed" sets prior variance parameters to values in
init_group_prior_var.- niter_prefit
the maximum number of iterations of the E-M algorithm to perform during the initial parameter estimation step.
- niter
the maximum number of iterations of the E-M algorithm to perform during the complete parameter estimation step.
- min_var
minimum number of variables (SNPs and genes) in a region.
- min_gene
minimum number of genes in a region.
- min_group_size
Minimum number of variables in a group.
- min_p_single_effect
Regions with probability greater than
min_p_single_effectof having at most one causal effect will be used selected for the complete parameter estimation step.- null_method
Method to compute null model, options: "ctwas", "susie" or "none".
- EM_tol
A small, non-negative number specifying the convergence tolerance of log-likelihood for the EM iterations.
- force_run_niter
If TRUE, run all the
niterEM iterations.- ncore
The number of cores used to parallelize computation over regions.
- logfile
The log filename. If NULL, print log info on screen.
- verbose
If TRUE, print detail messages.