title: P-value in nnet: multinom() . P-value Wald test extracted, but ¿how i extract it by LIkehood ratio?
body: <p>I got a multinomial model, which goes like this:</p>
  <p>I got a bunch of observations (patients) that have 1 of 5 classes: Control, A_severe, A_low, B_severe, and B_low.</p>
  <p>So I tried to fit a multinom model with the package nnet, and I extracted the Wald test p-values as follows:</p>
  <pre><code>multinom_wout20_1 = multinom(formula_wout20_base,data=wout_20_training, maxit=10000)
  </code></pre>
  <pre><code>summary(multinom_wout20_1)
  </code></pre>
  <p>Coefs:</p>
  <pre><code>exp(coef(multinom_wout20_1))
  </code></pre>
  <p>Z Values</p>
  <pre><code>z_wout &lt;- summary(multinom_wout20_1)$coefficients/summary(multinom_wout20_1)$standard.errors
  z_wout
  </code></pre>
  <p>And we get the p-values:</p>
  <pre><code># 2-tailed z test
  p_wout &lt;- (1 - pnorm(abs(z_wout), 0, 1)) * 2
  p_wout
  </code></pre>
  <p>And then I passed them to a custom variable to see them as letters (more intuitive)</p>
  <pre><code>## Function to Pass our values to letters.
  sign_levels_df_letter &lt;- function(df) {
    df &lt;- ifelse(df &gt;.80, &quot;Z&quot;, ifelse(df &gt;.50, &quot;FFF&quot;,
               ifelse( df &gt;.30, &quot;FF&quot;,
                 ifelse(df &gt;.10 , &quot;F&quot;, 
                 ifelse(df &lt;= 0.0001, &quot;AAA&quot;,
                        ifelse(df &lt;= .0005,&quot;AA+&quot;,
                               ifelse(df &lt;= .001,&quot;AA&quot;,
                                             ifelse(df &lt;= .005, &quot;A+&quot;,
                                                    ifelse (df&lt;= .01, &quot;A&quot;,
                                                              ifelse(df&lt;= .05, &quot;A-&quot;,
                                                                     ifelse(df &lt;=.07, &quot;B&quot;,
                                                                            ifelse(df &lt;=.10, &quot;C&quot;, NA
                                             
                                             ))))))))))))
                   
      
    return(df)
  }
  </code></pre>
  <pre><code>aux_pwout0 = sign_levels_df_letter(p_wout) ; aux_pwout0
  </code></pre>
  <p>Which I suppose is the same (cause they coincide its symbiology with *, ***, and **) if I use the package <code>stargazer</code></p>
  <pre><code>library(stargazer)
  stargazer(multinom_wout20_1, type= &quot;text&quot; )   #   &quot;html&quot;, out=&quot;multi1.htm&quot;)
  </code></pre>
  <p>But as seen in the response of this thread:</p>
  <p><a href="https://stackoverflow.com/questions/42048872/multinomial-logistic-regression-in-r-multinom-in-nnet-package-result-different">multinomial logistic regression in R: multinom in nnet package result different from mlogit in mlogit package?</a></p>
  <p>There is some problems with using Wald instead of LogLikehood.
  <strong>¿How can get the Likelihood Ratio test p-value from my model?</strong></p>
  <p>I don't mind using other function for my data, but mlogit from the package mloget requires me to pass my data into a wide format, which is not as easy as it seems but I suppose I could extract from:</p>
  <p><a href="https://stackoverflow.com/questions/59203540/r-how-to-format-my-data-for-multinomial-logit">R: how to format my data for multinomial logit?</a></p>
  <p>If some user of this last function could tell me if there is some secret function that automates this, that also solves my problem.</p>