There seems to exist peculiar cases where optim does not take care
of constraints on the parameters to be optimized over. The call to
optim is of the form
opt - optim(cp, fn=sn.dev, gr=sn.dev.gh, method=L-BFGS-B,
lower=c(-Inf, 1e-10, -0.99527),
upper=c( Inf, Inf,
Adelchi:
Permit me to add to Prof. Ripley's comments:
If you want to know how to get around this kind of problem, I will
tell you that I would modify the definition of cp to send the
constraints to +/-Inf. Functions like optim tend to work better with
unconstrained problems than