I am trying to plot my regression analyses
I have created a glm model to determine the effect of agriculture on species richness of birds.
this is my code for my glm:
spec_rich_final <- glm(species_richness ~ (trans_forest * fert_total) + 
agri + I(trans_agri^2) + diversity + (I(diversity^2)) + (I(trans_forest^2) 
* fert_total) + trans_semi_natural + bio1, poisson(link = "log"), 
data=data_transformed)
then this is my code for plotting:
effect_plot(spec_rich_final, pred = agri, interval = TRUE, 
partial.residuals = TRUE)
I then get this error:
Error in names(o) <- rownames(attr(terms(formula), "factors")) : 
  'names' attribute [10] must be the same length as the vector [8]
Can anyone help? no idea what it means by attribute 10 or vector 8??
 
     
     
    