Multinom with Matrix of Counts as Response

落爺英雄遲暮 提交于 2019-12-05 18:41:42

The easiest method for obtaining the predictions for a new variable is to define the new data as a data.frame.

Using the sample code

> predict(fit1, newdata = data.frame(predictor = 0.5), type = "probs")
 [1] 0.07231972 0.05604055 0.05932186 0.07318140 0.03980245 0.06785690 0.03951593 0.02663618
 [9] 0.04490844 0.04683919 0.02298260 0.04801870 0.05559221 0.04209283 0.03799946 0.06406533
[17] 0.04509723 0.02197840 0.06686314 0.06888748
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!