Open ErikRingen opened 2 days ago
Currently, the function can only take two variables, set with the var1
and var2
arguments. If there are more than two variables in the model, the OU function holds all other variables at their median values during the computation (see here). Do you think this is the right approach?
I don't think we should do this now that I have been fitting models with more than 2 traits, because it can really obscure the dynamics and give a misleading picture. I am working on a 3D flowfield for the paper, so maybe we can use that as a template for a refactor of this function.
Okay, makes sense. I'll wait to see what you come up with. Note that any changes will also apply to coev_plot_selection_gradient()
which currently takes the same approach (it holds all other values constant).
I was taking a look at the code for
coev_plot_flowfield()
and it seems like it would not be correct for more than 2 traits, because it does not track indirect effects (e.g., y1 -> y2 -> y3). Even if only two traits can be plotted at a time, all need to be tracked in the system.