title: How to get the number of observations included in a model created using the function multinom in R?
body: <p>I am learning how to use and interpret the output from <code>multinom()</code> of the package <code>nnet</code>in R. The dataset I use for the exercise contains variables with some missing values. I believe that the observations containing missing values are excluded from the multinomial regression when using this fonction. I would like to know how I can get the number of observations that were included in the model.</p>
  
  <p>A similar question was asked about a year ago  (<a href="https://stackoverflow.com/questions/16012082/how-to-change-the-output-after-running-multinom-in-r">How to change the output after running multinom() in R</a>) but this specific aspect of the question was not answered. I am hoping this time someone will have an answer.</p>
  
  <p>My dataset contains 42 variables and 593 observations. To illustrate my question, I ran a model with the outcome of interest (4 groups) and 3 covariates (2 with some missing values). </p>
  
  <p>The output is:</p>
  
  <pre><code>model=multinom(GROUP ~ female + BMI + born_Canada, data)
     # weights:  20 (12 variable)
     initial  value 679.284237 
     iter  10 value 637.285180
     final  value 637.129747 
     converged
  
  summary(model)
  Call:
  multinom(formula = GROUP ~ female + BMI + born_Canada, data = data)
  
  Coefficients:
    (Intercept)     female          BMI born_Canada
  2   0.2827215 -0.1446951  0.007395264   0.1870738
  3   0.5513568 -0.3101297 -0.007632127   0.1948097
  4  -0.3698947 -0.5663595 -0.024331298   0.6115428
  
  Std. Errors:
    (Intercept)    female       BMI born_Canada
  2   0.6753277 0.2694006 0.0197283   0.4484126
  3   0.7161380 0.2806695 0.0215023   0.4632981
  4   1.0415322 0.3829313 0.0312360   0.6920262
  
  Residual Deviance: 1274.259 
  AIC: 1298.259            
  </code></pre>
  
  <p>From this, what is the command I need to write to get the number of observations analyzed? Any suggestions?</p>
  
  <p>Thank you</p>