Elektrine lite

← Feed

@LeoRJorge@mastodon.social

Post #2266679

2024-10-20 06:27 UTC

@tslumley@fediscience.org not sure what to make of it, given lm works only with numeric responses but glm accepts categorical responses. It's still a bit weird that lm doesn't even give you a warning that it converted the variable

Replies (1)

  • @tslumley@fediscience.org 2024-10-20 07:02

    @LeoRJorge@mastodon.social It's model.response(), which has a type="any" or type="numeric" option. lm() uses "numeric" and glm uses "any" I think the reason I didn't know is that character variables were much less common before the stringsAsFactors revolution so I'd never come across the issue before.

    Open ##2266680