I have 20 random points (coordinates) and for each point I have a classification of the dominant specie (only one specie per point), I have 6 species in total. I have 4 years of data (1976, 1985, 1993 and 2018). Therefore for each point I have one classification of specie for each year. Thus, I basically have categorical dependent variables (the species). For each categorical dependent variable, I have two categories (present or absence), which are mutually exclusive. I also have one independent variable (years) with 4 categories (1976, 1985, 1993 and 2018), which are related. I want know if the proportion of the species who were present or absent differed in each year and which species and which year differed. My data is not normal neither present homocedasticity (even after transformations). Is it appropriate to perform Cochran’s Q test and post hoc McNemar? I have tried some post hoc, but they only one that worked out in R was one using this command from rcompanion package (pairwiseMcnemar(x=mydata.long$presence, g=mydata.long$oitocinco, block=mydata.long$id, method="bonferroni", test="mcnemar"). It seems it is a post-hoc McNemar approximate using chi-square distribution (no continuity correction). But I do not understand what this means, neither if it is appropriate. I heard about perform repeated Generalized Linear models (GLM), however I could not find a scrip for it neither how to organise a table for R. Could anyone help me with that, please?

More Ana Elisa Almeida Ayres's questions See All
Similar questions and discussions