Re: [R] predict() works with the design matrix but throws error with some rows of that matrix

2015-11-20 Thread Damir Cosic
[,1] 1 4.018394e-05 2 9.999780e-01 3 9.999843e-01 4 2.702566e-05 5 9.999694e-01 6 9.999826e-01 On Fri, Nov 20, 2015 at 4:57 AM, peter dalgaard wrote: > > On 20 Nov 2015, at 10:07 , peter dalgaard wrote: > > >> > >> On 20 Nov 2015, at 04:53 , Damir Cosic

Re: [R] predict() works with the design matrix but throws error with some rows of that matrix

2015-11-20 Thread Damir Cosic
Right on! I was using the expression for binomial logit. Thank you so much! On Fri, Nov 20, 2015 at 12:23 PM, peter dalgaard wrote: > > > On 20 Nov 2015, at 17:17 , Damir Cosic wrote: > > > > > > To do the same with matrix multiplication, I use the expression >

[R] predict() works with the design matrix but throws error with some rows of that matrix

2015-11-19 Thread Damir Cosic
Hello, I am having problems with predict() after a multinomial logit regression by multinom(). I generate a design matrix with model.matrix() and use it to estimate the model. Then, if I pass the entire design matrix to predict(), it returns the same output as fitted(), which is expected. But if I