I am using a dataset from this link (https://www.utsc.utoronto.ca/~butler/c32/ais.txt) where I am having the error
Error in Y[keep, ] <- Y1 : NAs are not allowed in subscripted assignments
Calls: ... eval_with_user_handlers -> eval -> eval -> predict -> predict.multinom
Execution halted
data_url <- "https://www.utsc.utoronto.ca/~butler/c32/ais.txt"
athlete_data <- read.table(data_url, header = TRUE)
sport_played <- multinom(athlete_data$Sport ~ athlete_data$Ht + athlete_data$Wt, data = athlete_data, maxit = 200)
Hts <- c(160, 180, 200)
Wts <- c(50, 75, 100)
combinations <- crossing(Ht = Hts, Wt = Wts)
combinations
p <- predict(sport_played, combinations, type = "probs")
cbind(combinations, p)