I was trying to figure out how envfit results were generated and came across this post which was super helpful: How are envfit results created?
However, I am still confused as to how this would be transposed for factor variables as a linear regression would not make sense as I understand that the environmental factors are treated as dependent variables? I do understand that the coefficients on the ordination axes represent the average of all sites that are part of one category, but where does the R2 comes from?
As logistic and multinomial regression do not provide standard R2, I assume this is not what is done for factors.
Also, if linear regression is the underlying modelling method in envfit, what is the advantage of performing it with permutation tests in opposition to the unique coefficient/p-value that would be obtained by using least squares methods?
I am trying to understand a bit better the function as I am planning to use it in a publication and would prefer to make sure I understand well what I am presenting.