0

I am trying to run a multinomial regression on FIFA data. I am trying to predict position based off player attributes. When attempting to set my baseline with the command base = relevel(fifa19$Position, ref = 'ST'), I get the error:

Error in relevel.default(fifa19$Position, ref = "ST") : 'relevel' only for (unordered) factors

I thought that positions ARE unordered. Is this not the case or am I missing something else?

Cœur
  • 37,241
  • 25
  • 195
  • 267
cap
  • 337
  • 3
  • 14
  • When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Your positions probably shouldn't be ordered. Just regular factors would be best unless you are some how treating them as an ordinal variable. – MrFlick Dec 03 '19 at 04:17
  • Thank you for your response. Can you elaborate please? The positions are nominal variables (ST, CM, CB, LB, RB, etc.) – cap Dec 03 '19 at 04:20
  • And what does `class(fifa19$Position)` return? Does that return "factor"? – MrFlick Dec 03 '19 at 04:20
  • It returns 'character' – cap Dec 03 '19 at 04:22
  • Fixed it. Used `as.factor` command. Thanks for the help – cap Dec 03 '19 at 04:26

0 Answers0