Hard to know without seeing more of the code, but I'd suspect that X or
other object somehow became a list. You might try disecting the
function--that is, entering each line of code and seeing where it bombs
out. First, though, check your inputs to the function, and make sure they
are what you think they are.
Best,
Dan
On Wed, 26 Apr 2006, Karen Gr?pin wrote:
Hi All,
I am using Dan's code from the section to do 2 a. But, I am getting the
following error. I assume it is because I need to modify something to
adapt it to this problem, but can't figure out what. I have tried a
range of start values (before I was getting the vmmin error):
op.out <- optim(par=start.val,fn=ord.probit.llh, method="BFGS",
hessian=T, control=list(fnscale=-1),Y=Y,X=X)
Error in optim(par = start.val, fn = ord.probit.llh, method = "BFGS", :
(list) object cannot be coerced to 'double'
Any help would be much appreciated,
Karen
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l