ENMTools
ENMTools copied to clipboard
formula recasting doesn't allow suppressing intercept
I noticed that if a user passes in a formula like this presence ~ 0 + bio1
or presence ~ bio1 -1
, the formula recasting (f <- reformulate(attr(delete.response(terms(f)), "term.labels"), response = "presence")
eliminates the suppression of the intercept, which sometimes might be useful (I noticed it because I need to do this for the phylogenetic models, to make them identifiable). This happens because "term.labels" does not include the 0
or -1
because they technically are not terms. I've found this method of recasting the formula works in this situation: f <- update(f, presence ~ .)
Interesting. So will it be sufficient to just replace the former with the latter?