GxE_interaction_RoS | R Documentation |

Constructs a LEGIT model and returns the regions of significance (RoS) with the predicted type of interaction (diathesis-stress, vantage-sensitivity, or differential susceptibility). RoS is not recommended due to poor accuracy with small samples and small effect sizes, GxE_interaction_test has much better accuracy overall. Only implemented for family=gaussian.

```
GxE_interaction_RoS(
data,
genes,
env,
formula_noGxE,
t_alpha = 0.05,
start_genes = NULL,
start_env = NULL,
eps = 0.001,
maxiter = 100,
ylim = NULL,
reverse_code = FALSE,
rescale = FALSE
)
```

`data` |
data.frame of the dataset to be used. |

`genes` |
data.frame of the variables inside the genetic score |

`env` |
data.frame of the variables inside the environmental score |

`formula_noGxE` |
formula WITHOUT |

`t_alpha` |
Alpha level of the student-t distribution for the regions of significance (Default = .05) |

`start_genes` |
Optional starting points for genetic score (must be the same length as the number of columns of |

`start_env` |
Optional starting points for environmental score (must be the same length as the number of columns of |

`eps` |
Threshold for convergence (.01 for quick batch simulations, .0001 for accurate results). |

`maxiter` |
Maximum number of iterations. |

`ylim` |
Optional vector containing the known min and max of the outcome variable. Even if your outcome is known to be in [a,b], if you assume a Gaussian distribution, predict() could return values outside this range. This parameter ensures that this never happens. This is not necessary with a distribution that already assumes the proper range (ex: [0,1] with binomial distribution). |

`reverse_code` |
If TRUE, after fitting the model, the genes with negative weights are reverse coded (ex: |

`rescale` |
If TRUE, the environmental variables are automatically rescaled to the range [-1,1]. This improves interpretability (Default=FALSE). |

Returns a list containing the RoS and the predicted type of interaction.

Alexia Jolicoeur-Martineau, Jay Belsky, Eszter Szekely, Keith F. Widaman, Michael Pluess, Celia Greenwood and Ashley Wazana. *Distinguishing differential susceptibility, diathesis-stress and vantage sensitivity: beyond the single gene and environment model* (2017). https://osf.io/preprints/psyarxiv/27uw8. 10.17605/OSF.IO/27UW8.

Daniel J. Bauer & Patrick J. Curran. *Probing Interactions in Fixed and Multilevel Regression: Inferential and Graphical Techniques* (2005). Multivariate Behavioral Research, 40:3, 373-400, DOI: 10.1207/s15327906mbr4003_5.

```
train = example_2way(500, 1, seed=777)
ros = GxE_interaction_RoS(train$data, train$G, train$E, y ~ 1)
ros
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.