Expand Covariate Matrix Based on Cell Type Proportions
Source:R/data_selection.R
expand_covariate_matrix.Rd
Expands the design matrix X
using cell type proportions lambda
,
applying scaling for sequencing depth and removing low-frequency features.
Arguments
- X
Covariate matrix of dimension (n times p)
- lambda
Matrix of cell type proportions (n x k)
- family
Model family: "poisson", "negative binomial", or "gaussian"
- keep_coef
Matrix (p by k) indicating which coefficients to keep in case one knows what to remove a priori(default: all TRUEs)
- lib_size
Library sizes for each sample (default: 1 for all)
- min_reads_per_1000
If family == "poisson" or "negative binomial" Minimum reads per 1000 for robust scaling (default: 1)
- max_noise_sd
If family == "gaussian" maximum standard deviation of the error term to be used for robust scaling (default: 1)