I'm trying to use the function variance_ratio()
from the 'codyn' package to find whether two populations' abundances are positively or negatively correlated over time. The column I'm using for species.var
isn't actually the species names; it's names for the two populations. For replicate.var
, I am using a variable called "siteyear."
When I try to find the variance ratio, I'm getting the error message
"Error in check_multispp(df, species.var, replicate.var): One or more replicates consists of only a single species; please remove these replicates prior to calculations."
I assume this error means that one of the "species" is not found at all in some of the replicates, making its abundance always zero. However, I checked and all the site-years have abundance >0 for both "species", for at least one time point. There are some time points where one population has 0 abundance, but I don't see why that should be an issue.