predict() works with the design matrix but throws error with some rows of that matrix
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 <pdalgd at gmail.com> wrote:
On 20 Nov 2015, at 17:17 , Damir Cosic <damir.cosic at gmail.com> wrote: To do the same with matrix multiplication, I use the expression
1/(1+exp(-xb)):
head(1/(1+exp(-(cbind(c(1), mm) %*% coef(m)[2,])))) which should produce the third column above, but it doesn't:
I'm rusty on this, but I suspect that you need e_i/sum(e_i) with e_i = exp(x b_i) (and b_1 == 0 by convention) -pd -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com