Compute Significance for Pairwise Covariate Contrast
Source:R/core_optimal_K.R
compute_contrast_significance.Rd
Calculates p-values and adjusted q-values for contrasts between two effects within a specific cell type.
Usage
compute_contrast_significance(
input_list,
cell_type,
effect_names,
beta_name = "beta_estimate",
covariance_name = "vcov",
sided = 2,
direction = "pos"
)
Arguments
- input_list
A list of model outputs with beta and covariance matrices.
- cell_type
Character. Cell type of interest.
- effect_names
Character vector of length 2 indicating the covariates to contrast.
- beta_name
Name of the beta matrix (default: "beta_estimate").
- covariance_name
Name of the covariance matrix (default: "vcov").
- sided
Integer. 1 for one-sided, 2 for two-sided test.
- direction
Character. "pos" or "neg", used if
sided = 1
.