Re: [R] Seeking help for using optim for MLE in R

2019-01-10 Thread Bert Gunter
Probably: don't do this. Use the nnet package (and there may well be others) to fit multinomial regression. See here for a tutorial: https://rpubs.com/rslbliss/r_logistic_ws Cheers, Bert On Thu, Jan 10, 2019 at 6:18 AM Naznin Sultana wrote: > Hi, I am writing a program for MLE of parameters

[R] Seeking help for using optim for MLE in R

2019-01-10 Thread Naznin Sultana
Hi, I am writing a program for MLE of parameters of multinomial distribution using optim.But when I run the program outside of a function it gives me the likelihood value, but when using it for optim function it gives the error message "Error in X %*% beta : non-conformable arguments". If X, and be