0

I got some NaNs in for some standard errors in my multinomial regression output (nnet package, formula multinom(). Now I want R to ignore these NaNs , for example in replacing them as zero. I tried the following code

unstack(within(stack(z$standard.error), values[is.nan(values)] <- 0)) 

with z as the summary test result. But it doesn't work. Is there a way to solve this problem? Thank you in advance

user2685139
  • 111
  • 4
  • 1
    Please read [the answer to this FAQ](http://stackoverflow.com/a/5963610/1412059) to learn what a reproducible example is and how to give one. And I don't think it is a good idea to ignore `NaN`s in regression output. It is an indication of overfitting and other problems. – Roland Aug 31 '13 at 15:44
  • Thank you for your post. Due to this I found my mistake and now there are no NaNs anymore. – user2685139 Sep 01 '13 at 10:29
  • Next time, you can still re-write your question and share the answer you found so it can benefit everybody. – Yohan Obadia Mar 08 '16 at 19:26

0 Answers0