To validate the and G×E& sampling estimates, we created simulations that mimicked experimental data, and provided an array of scenarios to understand how effect size, presence of GxE, total sample size, experimental design, and variability were affected, as well as the ability to detect and measure these patterns. We simulated datasets with total sample sizes (number of environments x number of genotypes x sample size) between 32 and 500 individuals.
For reciprocal transplant data, we simulated genotypic effects that increased linearly at rate y along an environmental variable (e) for genotypes equally spaced from environment j = [1, 2, ... nenv]. We generated unitless phenotypic data based on an equation in the Supplemental File "Equation for power output results" (power_analyses_pasted_graphic.pdf).
In this equation, the phenotype of individual k from genotype i in environment j is given by the genotypic effect, the reaction norm (where ej is the value of the environment and beta is the slope of the reaction norm), an interaction term for genotype i in environment j that describes the deviation of the reaction norm from linearity, and error.
Interaction terms were drawn from a normal distribution with mean of zero and variance equal to the number of genotypes. Random error was added by sampling from a normal distribution with a mean of zero and standard deviation of either 0.5 (low residual variation) or 1 (high residual variation). Scenarios with no random error (= 0) were used to assess population parameters.
For common garden designs, we adjusted this approach to model designs in which different numbers of genotypes were reared in two common environments. We generated a single phenotypic reaction (see supplemental docs) norm for each group of genotypes (i.e., genotypes native to the same environment) based on the first terms of Eqn. 4. Then we generated reaction norm data for individual genotypes by adding the interaction term and error to the overall reaction norms.
See Related Dataset Albecker et al. (2022) for model code.