ENMTools icon indicating copy to clipboard operation
ENMTools copied to clipboard

formula recasting doesn't allow suppressing intercept

Open rdinnager opened this issue 6 years ago • 1 comments

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 ~ .)

rdinnager avatar Mar 20 '18 01:03 rdinnager

Interesting. So will it be sufficient to just replace the former with the latter?

danlwarren avatar Mar 20 '18 10:03 danlwarren