Closed Torvaney closed 5 years ago
A more informative error message when you try to predict.dixoncoles with new (team) factor levels would be nice:
predict.dixoncoles
library(tidyverse) library(regista) fit <- suppressWarnings( dixoncoles(hgoal, agoal, home, away, data = premier_league_2010) ) newdata <- premier_league_2010 %>% filter(home != "Arsenal", away != "Arsenal") %>% factor_teams(c("home", "away")) predict(fit, newdata = newdata) #> Error in rate_params %*% t(modeldata$mat1): non-conformable arguments
A more informative error message when you try to
predict.dixoncoles
with new (team) factor levels would be nice: