Important bugs with simulations
I noticed two unexpected behaviors while testing different value of mu and sd in init_variable and add_interaction functions. Everything looks fine when I change sd for all variables (in my case environment, genotype and the interaction) -> I can see on identity plots that values of parameters are more spread, and R2 are larger when I increase sd for all variables. However, this is not the case when I change sd of a single variable: for example when I used a high sd for one variable and a low sd for the other variable, then identity plots look the same for both variables, with wide variation of actual and estimated parameters and good R2 values. This is not normal (I should get smaller R2 and smaller actual parameters values for the variable with low sd. The second problem I noticed is that R2 values on all identity plots were much higher when I included an interaction term in the model (while keeping everything else the same), even when the sd and mu for interaction were very low. I think this is not normal and may be related to the first problem.