In other words, when I do nnet(...) I can use the size parameter to control the number of units in the hidden layer. My particular model requires outputting probabilities so I wanted logistic units and so I turned to multinom from the nnet package to output type=’probs’ in my predict function. How can I pass down a size argument? When I call it with, say, size=5 or something I get an error:
formal argument "size" matched by multiple actual arguments
multinomfits linear multinomial logistic models, which is why the size parameter is hardcoded to 0. If you want an actual neural network with multinomial outputs, just usennetwith a response with more than 2 levels, and setsoftmax=TRUE.