How does multinom() treat NA values by default?

前端 未结 2 2011
迷失自我
迷失自我 2021-01-26 14:35

When I am running multinom(), say Y ~ X1 + X2 + X3, if for one particular row X1 is NA (i.e. missing), but Y,

2条回答
  •  暖寄归人
    2021-01-26 15:35

    You can specify the behaviour

    - na.omit and na.exclude: returns the object with observations removed if they contain any missing values; differences between omitting and excluding NAs can be seen in some prediction and residual functions
    - na.pass: returns the object unchanged
    - na.fail: returns the object only if it contains no missing values
    

    http://www.ats.ucla.edu/stat/r/faq/missing.htm

提交回复
热议问题