# Multinomial logistic regression: NaN produced for std error

Hello all,

I am trying to develop a prediction model for a certain condition based on 200 patients. The dependent variable (condition) has been categorized in 4 levels, where there are 25 predictors (both (multi)nomial as continious).
Summary of tabel:

``````str(Predictors)
tibble [200 x 28] (S3: tbl_df/tbl/data.frame)
\$ Age                   : num [1:200] 17 57 20 38 36 22 53 40 44 56 ...
\$ Gender                : Factor w/ 2 levels "0","1": 1 1 1 2 1 2 1 2 1 1 ...
\$ BMI                   : num [1:200] 20.9 24.3 25.2 23.6 25.6 ...
\$ Height                : num [1:200] 1.71 1.72 1.78 1.77 1.8 1.86 1.72 1.9 1.68 1.64 ...
\$ Weight                : num [1:200] 61 72 80 74 83 81 74 82 68 54 ...
\$ AC                    : Factor w/ 2 levels "0","1": 2 1 2 1 1 1 1 1 1 1 ...
\$ Mouth opening preop   : num [1:200] 48 51 44 41 45 52 47 49 40 40 ...
\$ TMJ pain preop        : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 3 4 ...
\$ TMJ sound preop       : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 4 ...
\$ Procedure             : Factor w/ 4 levels "0","1","2","3": 3 1 3 1 1 3 1 1 4 1 ...
\$ MC Translation Y      : num [1:200] -0.5 0.9 -6.7 -6.4 -8.3 4.9 -6.2 -3.4 -8 -4.2 ...
\$ MC Rotation 1         : num [1:200] -5.2 -0.3 -3.2 -4.1 -5 -4.3 10.1 1.5 -8.3 -4.6 ...
\$ MC Rotation 3         : num [1:200] 0 -1.7 -2.8 0.6 -0.9 -2.1 0.4 -1.4 0.2 1.4 ...
\$ LR Translation X      : num [1:200] 0.5 2.9 3 1.9 2.2 3.3 2.6 2 0.6 2.1 ...
\$ LR Translation Y      : num [1:200] -0.6 9.3 -0.9 -1.5 -2.7 0.6 -0.9 0.1 2.6 1.7 ...
\$ LR Translation Z      : num [1:200] 1.3 5.5 1.4 3.2 0.8 -1.6 -0.8 4.3 3.7 3 ...
\$ LR Rotation 1         : num [1:200] -1.6 -2.2 -2.2 -5.3 -3.5 2.8 -2.2 -2.7 -6.7 -5.6 ...
\$ LR Rotation 2         : num [1:200] -3.1 -4.7 -6 -5.3 -7.7 -11.3 -3.2 -1.9 -1.1 -12.8 ...
\$ LR Rotation 3         : num [1:200] -5.1 1.7 -2.7 -4.6 -5.1 -11.8 -5.4 -4.5 0.7 -10.3 ...
\$ RR Translation X      : num [1:200] -0.9 -0.6 -0.2 -0.6 -0.3 1.4 -2.2 -1.3 -2.1 0.3 ...
\$ RR Translation Y      : num [1:200] -0.8 6.7 -1.7 -1.3 -1.7 1.3 -1.7 2.2 0.8 2.4 ...
\$ RR Translation Z      : num [1:200] 0.6 5.9 0.1 0.5 0.1 -0.9 -1.5 2.8 3.1 3.3 ...
\$ RR Rotation 1         : num [1:200] -2.3 -1.6 -5.2 -3.2 -6.9 -0.7 -4.9 -1.5 -7.1 -7.3 ...
\$ RR Rotation 2         : num [1:200] 5.6 6.1 2.8 -0.4 8.3 0.1 3.7 3.7 8.1 7.2 ...
\$ RR Rotation 3         : num [1:200] 5 3.7 1.9 -1.3 7.1 3.3 6.5 0.9 6.7 7.5 ...
\$ Anterior facial height: num [1:200] 68.6 73.3 62 70.6 85 ...
\$ Mandibular plane angle: num [1:200] 33.8 33.5 36.8 37.4 47.1 ...
\$ Condition             : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
``````

For the regression, I used multinom from the nnet package and was built like this:

``````#Multinomial model
PredictionModel=multinom(Condition ~ Age + Gender + BMI + AC + `Mouth opening preop` + `TMJ pain preop` + `TMJ sound preop` + Procedure + `MC Translation Y` + `MC Rotation 1` + `MC Rotation 3` + `LR Translation X` + `LR Translation Y` + `LR Translation Z` + `LR Rotation 1` + `LR Rotation 2` + `LR Rotation 3` + `RR Translation X` + `RR Translation Y` + `RR Translation Z` + `RR Rotation 1` + `RR Rotation 2` + `RR Rotation 3` + `Anterior facial height` + `Mandibular plane angle`, data = Predictors)
``````

This resulted in some NaN for std error (AC1 and TMJ pain preop3 for condition=2):

I am unable to locate the problem for these NaN errors. Please let me know if any additional information is necessary.

Thank you!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.