Generates various types of phenotypes (quantitative, binary, ordinal, time-to-event) from linear predictors using appropriate link functions.
GRAB.SimuPheno(
eta,
traitType = "binary",
control = list(pCase = 0.1, sdError = 1, pEachGroup = c(1, 1, 1), eventRate = 0.1),
seed = NULL
)Simulated phenotype vector or data frame:
Numeric vector of continuous values.
Numeric vector of 0/1 values.
Numeric vector of categorical levels.
Data frame with SurvTime and SurvEvent columns.
Vector of linear predictors (typically covariates×beta + genotypes×beta).
Type of phenotype: "quantitative", "binary", "ordinal", or "time-to-event".
List of simulation parameters specific to each trait type:
Proportion of cases (binary traits).
Error term standard deviation (quantitative traits).
Group proportions (ordinal traits).
Event rate (time-to-event traits).
Random seed for reproducibility (optional).
Trait Type Details:
Quantitative: Y = eta + error, where error ~ N(0, sdError²)
Binary: Logistic model with specified case proportion
Ordinal: Proportional odds model with specified group proportions
Time-to-event: Weibull survival model with specified event rate
For more details, see: https://wenjianbi.github.io/grab.github.io/docs/simulation_phenotype.html