ScottClaessens / coevolve

coevolve R package for Bayesian dynamic coevolutionary models using Stan
GNU General Public License v2.0
7 stars 0 forks source link

Include geographic covariance #5

Closed ScottClaessens closed 11 months ago

ScottClaessens commented 1 year ago

This should actually be relatively easy to do as the code is right there in Erik's previous Stan models. I'm thinking that the user would just enter a (scaled or unscaled) geographic distance matrix, with rows and column names equal to tip labels, as an argument to coev_fit(). Maybe geo_dist = NULL as a default. If a matrix is entered, the function scales it between 0 and 1 under the hood, ensures that it is in the same order as the phylogeny, and then includes it in the model with several Gaussian Processes, one for each variable.