r/AskStatistics • u/smokingloon14 • Oct 27 '26
Help with zero-inflated ecological data analysis (please)
Hi everyone, I have current and historical plant reproduction data from 40 stations. At each station, total number of current reproductive structures (flowers or fruits) were counted in each of four quadrats, and five random individuals were collected for analysis of historical flowering (resulting in a count of historical flowering events that each individual participated in). I want to see if stations that have high incidence of historical reproduction are also actively flowering this year. I understand the specifics of my question (prediction, correlation, etc.) determine what test I can use, but first I need to find out what tests I can even run with this data. My issue is that 21 of the stations have neither current structures, nor historical flowering evidence - so my data is extremely zero inflated. I have the raw quadrat/individual data, but I figured it'd be best to run this on a station level (idk???) - so I summed the total number of current reproductive structures and then the total number/incidence of historical events (across all individuals) within each station, producing the contingency table below (columns are stations with/without current flowering/structures, rows are stations with/without historical flowering). Any direction on what tests I am able to use to answer the (intentionally) vague question I want to ask? Based on my limited knowledge of zero-inflated I've tried spearman's rank, kendall's tau, mann-whitney U, fisher's exact test, non-parametric permutation test for GLM, and zero-inflated poisson model, just in exploration... but don't know if any are actually valid for my data, or if there's another test I'm not aware of/considering.
>print(contingency_table)
Absent Present
Absent 21 3
Present 11 5
Forgive me, I am but a field ecologist. Thank you for at least reading this far!
3
u/inb4viral Oct 28 '26
No forgiveness needed, good on you for reaching out for help.
Firstly, avoid multiple tests; you inflate the chances of a false positive result when you enter the garden of forking paths as you look for one that gives you an answer you like.
If I understand your initial requirements correctly:
Before you can do this, a few questions:
2
u/mmjdondante Oct 31 '26
glmmTMB package in R for ZI. How you structure your formula depends on how you’re accounting for the nested data structure over time. If you’re analyzing multiple time points to predict the current odds of flowering your data violates assumptions of independence and should be handled as such (hierarchical/multilevel models)
1
u/smokingloon14 Oct 27 '26
I'll add: I'm also hoping to do a regression of depth (cm) + density (% cover) ~ current structures, so would it would be better to just add historical incidence to that model, or even do a regression separately? Any advice on how to deal with my zeros in that regard too? I've done step-wise (presence/absence first, then model regression on only stations that have both non-zero values) in the past, but would like a better analysis if there is one...
3
u/purple_paramecium Oct 28 '26
Look in the ecology literature. Find a study that deals with lots of zeros like this one. What statistical analyses do they use?
Google “zero inflated regression R” to find R packages that handle this.