Skip to contents

Generate single, multiple or longitudinal records from genomic values

Usage

gsim_records(
  genetic_values,
  records = NULL,
  genetic_design = NULL,
  fixed = 0,
  residual_covariance = 1,
  permanent_covariance = NULL,
  seed = 1
)

Arguments

genetic_values

Finite animal-by-trait or animal-by-basis-coefficient matrix with animal row names and column names.

records

Data frame with unique record, animal, and trait IDs. Optional observation_unit groups correlated residuals across traits. Default creates one record per animal and trait.

genetic_design

Optional record-by-genetic-column design, for example longitudinal basis rows. Default uses the record's trait column.

fixed

Scalar or one fixed-effect contribution per record.

residual_covariance, permanent_covariance

Trait covariance matrices (or scalar diagonal values). Entirely zero matrices are supported. Residuals are shared within observation units; permanent effects within animals.

seed

Nonnegative seed for separate identity-keyed residual and permanent streams.

Value

List with observable records, separate simulation truth, and a covariance noise descriptor for subsequent pooled observations. The supplied genomic values, rather than parent-average workload latents, generate the genetic record contribution. At most 64 observed traits.