Skip to content
Prev 294514 / 398502 Next

Discrete choice model maximum likelihood estimation

See below.
On 14-05-2012, at 13:21, infinitehorizon wrote:

            
Due to urgent matters, I can only answer briefly.

optim doesn't have an argument param. It does have an argument par so you should have written par=start.par.

If you do that you will get other error messages. You are calling L1, L2 and L3 with too many arguments.

And then you will find that the return value of llfn is a vector and not a scalar.

Finally why are passing x=x in the  optim call to llfn? It is not used anywhere.

You need to rethink your approach. And certainly read the help for optim.

Berend