standardize_feature: Centralize (by design matrix) and standardize (by pooled...

View source: R/helpers_adjust_batch.R

standardize_featureR Documentation

Centralize (by design matrix) and standardize (by pooled variance across all batches) feature abundances for empirical Bayes fit

Description

Centralize (by design matrix) and standardize (by pooled variance across all batches) feature abundances for empirical Bayes fit

Usage

standardize_feature(y, i_design, n_batch)

Arguments

y

vector of non-zero abundance of a single feature (if zero-inflated is true).

i_design

design matrix for the feature; samples with zeros are taken out (if zero-inflated is true).

n_batch

number of batches in the data.

Value

a list with component: y_stand for vector of centralized and standardized feature abundance, and stand_mean/varpooled for the location and scale factor (these are used later to back transform the batch-shrinked feature abundance).


biobakery/MMUPHin documentation built on March 30, 2024, 4:50 a.m.