Performs Bayesian `similarity regression' on given logical response vector y against list of ontological term sets x. It returns an object of class sim_reg_output. Of particular interest are the probability of an association, which can be calculated with prob_association, and the characteristic ontological profile phi, which can be visualised using the functions plot_term_marginals, and term_marginals). The results can be summarised with summary.
sim_reg(
ontology,
x,
y,
information_content = get_term_info_content(ontology, x),
sim_params = list(ontology = ontology, information_content = information_content),
using_terms = get_terms(sim_params),
term_weights = rep(0, length(using_terms)),
prior = discrete_gamma(using_terms),
min_BF = -Inf,
max_select = 2000L,
max_phi_count = 200L,
two_way = TRUE,
selection_fn = fg_step_tab(N = length(y)),
lik_method = NULL,
lik_method_args = list(),
gamma0_ml = bg_rate,
min_ratio = 1e-04,
...
)ontology_index object.
list of character vectors of ontological terms.
logical response vector.
Numeric vector of information contents of terms named by term ID. Defaults to information content based on frequencies of annotation in x.
List of arguments to pass to get_asym_sim_grid.
Character vector of term IDs giving the complete set of terms to include in the the phi parameter space.
Numeric vector of prior weights for individual terms.
Function for computing the unweighted prior probability of a phi value.
Bayes factor threshold below which to terminate computation, enabling faster execution time at the expense of accuracy and precision.
Upper bound for number of phi values to sample.
Upper bound for number of phi values to include in final likelihood sum.
Boolean value determining whether to calculate semantic similarity `in both directions' (i.e. compute s_x and s_phi or just s_phi).
Function for selecting values of phi with high posterior mass.
Function for calculating marginal likelihood contional on values of phi.
List of additional arguments to pass to lik_method.
Function for computing marginal likelihood of data under baseline model gamma=0.
Lower bound on ratio below which to discard phi values.
Additional arguments to pass to selection_fn.