Generate simulated response.
simulated_data(
G,
E,
alpha,
beta,
error,
family = c("continuous", "survival"),
a1 = NULL,
a2 = NULL
)Input matrix of p genetic (G) measurements consisting of n rows. Each
row is an observation vector.
Input matrix of q environmental (E) risk factors. Each row is an observation
vector.
Matrix of the true coefficients for main E effects.
Matrix of the true regression coefficients for all main G effects (the first row) and interactions.
Error terms.
Type of the response variable. If family="continuous", a quantitative
vector is generated. If family="survival", a two-column matrix with the first column
being the log(survival time) and the second column being the censoring indicator is
generated.The indicator is a binary variable, with "1" indicating dead, and "0" indicating
right censored.
If family="survival", we generate the censoring time from a uniform
distribution where a1 is the left endpoint.
If family="survival", we generate the censoring time from a uniform
distribution where a2 is the right endpoint.
Response variable. A quantitative vector for family="continuous". For
family="survival", it would be a two-column matrix with the first column being the
log(survival time) and the second column being the censoring indicator. The indicator
is a binary variable, with "1" indicating dead, and "0" indicating right censored.