so i set gr=Null: > constrOptim(p0,minsquare,Y=Y,Z=Z,NULL,gr=NULL,ui=A,ci=B,method="BFGS") and i recieved the following error: Error in optim(theta.old, fun, gradient, control = control, method = method, : objective function in optim evaluates to length 0 not 1 -- View this message in context: http://www.nabble.com/Stuck-using-constrOptim-tp23197912p23204289.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.