What's the best way to determine if a particular host plant species (host_plant column) was infected in significantly higher number by a certain pathogen genus (pahothogen_genus column)? I have collected disease reports for three plant disease (rust, powdery mildew, downy mildew) for the past decade (2010-2020), using a systematic review. I would like to know if a particular plant species was getting infected more by a particular pathogen genus. Ultimately, I want to determine if the pathogen is generalist if there is no significant relationship with a certain host plant. A link to an example analyses would be awesome. Thanks. Here is the glimpse of my data

enter image description here


1 Answer 1


One approach would be to use a permutation test. Use your real data to calculate a specificity metric - perhaps the proportion of occurrences of your pathogen in one plant species. Then randomise your data, and re-calculate the metric, repeating many times (e.g. 1000) to generate a distribution of expected metrics. You can then test whether your observed metric falls outside the 95% expected distribution.

This is a fairly standard approach to testing for specificity/generalism, but you must carefully consider whether your randomisations make sense - what is randomised, and how is of paramount importance for the test to be valid.

  • $\begingroup$ Hi, Thanks. Could you please direct me to an example analyses in R programming language? $\endgroup$
    – Ahsk
    Jan 11, 2022 at 5:10
  • $\begingroup$ Not really - the nature of permutation tests mean they need to be tailored to your particular hypothesis. The calculation is usually fairly simple - the tricky thing is defining a sensible metric and null distribution. This R-Bloggers page talks about them: r-bloggers.com/2019/04/what-is-a-permutation-test Here's a page with some example code: towardsdatascience.com/permutation-test-in-r-77d551a9f891 You can probably find more just by googling "permutation test example R" $\endgroup$
    – rw2
    Jan 11, 2022 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.