Suppress convergence message in nnet multinom function in R

Mark Danese

I am using knitr in R to produce a document of model outputs. I have suppressed messages and warnings in my code chunk. But I still get the convergence messages. I have looked for settings in the net package and in the multinom function. Does anybody know how to suppress them? I have looked on SO and on the internet. Someone asked a question in 2006 but I can't get the answer returned (and I don't know if it relevant today).

I am running many models in a loop, so it gets verbose very quickly. This also means that I can't easily put the model runs in a different chunk from the output because I am printing tables in each loop. An example of the output I am trying to suppress is below:

# weights: 10 (4 variable) initial value 2454.392816 iter 10 value 2175.558042 iter 10 value 2175.558039 final value 2175.558039 converged

Mark Danese

I finally found a function argument called "trace" in the nnet function. Its default is TRUE, and when set to "FALSE" the messages stop. I am guessing that nnet is called by multinom. Thank goodness for the ... in R so I could pass a function argument through.

Hopefully this will help someone else. I didn't mean to answer my own question (but I hope that is ok).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Multinomial regression using multinom function in R

From Dev

R caret nnet package in Multicore

From Dev

Suppress error message in R

From Dev

Bad compatibility of MuMin with multinom (nnet) objects having 3 level response variables?

From Dev

How can I suppress the creation of a plot while calling a function in R?

From Dev

How to set specific contrasts in multinom() in nnet package?

From Dev

How to use predict with multinom() with intercept in R?

From Dev

How to suppress R startup message?

From Dev

R -- Editing the 'nnet' Package

From Dev

Suppress library message output

From Dev

Catching the convergence or not by glmer in R

From Dev

How do you call model.frame() on a multinom/nnet object within a function?

From Dev

R: Tukey posthoc tests for nnet multinom multinomial fit to test for overall differences in multinomial distribution

From Dev

tryCatch suppress error message

From Dev

Function sweep() in R error message

From Dev

How to suppress download.file() "trying URL..." message in R?

From Dev

Suppress error message in R

From Dev

Bad compatibility of MuMin with multinom (nnet) objects having 3 level response variables?

From Dev

NAs occuring in the output of logistic regression (using multinom) in R

From Dev

How does the function multinom from R package nnet compute the multinomial probability weights?

From Dev

Suppress Message Box R6025 Pure Virtual Function Call

From Dev

Suppress(or hide) the specific return value of customized function in R

From Dev

Suppress server message in rsync

From Dev

How to suppress warning message in R regarding closing unused connection?

From Dev

nls convergence message in R

From Dev

How to suppress the warming message by R when using commandArgs()

From Dev

Suppress output of scan function in R ('Read X items')

From Dev

R function length error message

From Dev

What is an appropriate value of the parameter "Size" in nnet function in R?

Related Related

  1. 1

    Multinomial regression using multinom function in R

  2. 2

    R caret nnet package in Multicore

  3. 3

    Suppress error message in R

  4. 4

    Bad compatibility of MuMin with multinom (nnet) objects having 3 level response variables?

  5. 5

    How can I suppress the creation of a plot while calling a function in R?

  6. 6

    How to set specific contrasts in multinom() in nnet package?

  7. 7

    How to use predict with multinom() with intercept in R?

  8. 8

    How to suppress R startup message?

  9. 9

    R -- Editing the 'nnet' Package

  10. 10

    Suppress library message output

  11. 11

    Catching the convergence or not by glmer in R

  12. 12

    How do you call model.frame() on a multinom/nnet object within a function?

  13. 13

    R: Tukey posthoc tests for nnet multinom multinomial fit to test for overall differences in multinomial distribution

  14. 14

    tryCatch suppress error message

  15. 15

    Function sweep() in R error message

  16. 16

    How to suppress download.file() "trying URL..." message in R?

  17. 17

    Suppress error message in R

  18. 18

    Bad compatibility of MuMin with multinom (nnet) objects having 3 level response variables?

  19. 19

    NAs occuring in the output of logistic regression (using multinom) in R

  20. 20

    How does the function multinom from R package nnet compute the multinomial probability weights?

  21. 21

    Suppress Message Box R6025 Pure Virtual Function Call

  22. 22

    Suppress(or hide) the specific return value of customized function in R

  23. 23

    Suppress server message in rsync

  24. 24

    How to suppress warning message in R regarding closing unused connection?

  25. 25

    nls convergence message in R

  26. 26

    How to suppress the warming message by R when using commandArgs()

  27. 27

    Suppress output of scan function in R ('Read X items')

  28. 28

    R function length error message

  29. 29

    What is an appropriate value of the parameter "Size" in nnet function in R?

HotTag

Archive