simulated_data {GEInter} | R Documentation |
Simulated data for generating response
Description
Generate simulated response.
Usage
simulated_data(
G,
E,
alpha,
beta,
error,
family = c("continuous", "survival"),
a1 = NULL,
a2 = NULL
)
Arguments
G |
Input matrix of |
E |
Input matrix of |
alpha |
Matrix of the true coefficients for main E effects. |
beta |
Matrix of the true regression coefficients for all main G effects (the first row) and interactions. |
error |
Error terms. |
family |
Type of the response variable. If |
a1 |
If |
a2 |
If |
Value
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.