I have a categorical variable "n_produttore": A-B-C-D-E-F and the output of multinomial logit . "mlogit"
how to create the confusion matrix? I test this code, but doesn't work
predict prob* egen pred_max = rowmax(prob*)
g pred_choice = . forvalues i = 1/6 { replace pred_choice = i' if (pred_max == probi') }
local produttore_lab: value label n_produttore
label values pred_choice `produttore_lab'
tab pred_choice n_produttore
how to create the confusion matrix? I test this code, but doesn't work
predict prob* egen pred_max = rowmax(prob*)
g pred_choice = . forvalues i = 1/6 { replace pred_choice = i' if (pred_max == probi') }
local produttore_lab: value label n_produttore
label values pred_choice `produttore_lab'
tab pred_choice n_produttore
Comment