Skip to contents

Create persistent marker-effect and reporting-base state

Usage

gsim_trait_state(effects, center = 0, dominance = NULL, interaction = NULL)

Arguments

effects

Finite marker-by-trait matrix with marker row names, or a gsim result created with standardize_W=FALSE, whose B matrix supplies raw-dosage effects. Standardized results are rejected because their dosage scaling is not retained. A supplied matrix must already use raw-dosage units. A gsim result also supplies its dominance and interaction effects unless explicit replacements are passed.

center

Scalar or marker-named dosage center. It remains fixed across cohorts.

dominance

Named marker-by-trait heterozygosity effects, or NULL.

interaction

Named marker-by-trait raw-dosage environmental slopes, or NULL. Missing dominance calls use fixed HWE heterozygosity from center/2; interaction calls use the fixed dosage center. Effects are never rescaled.

Value

Compact gsim_trait_state. Effects are never rescaled or redrawn when the state is applied to later cohorts. Missing BED calls are imputed with this fixed center, not with selected-cohort allele frequencies.