[R] A question about optim function in R
Zixuan Qi
z|xu@n@q| @end|ng |rom duke@edu
Sun Jul 26 16:33:32 CEST 2020
Hi,
I encounter a problem in R. My program is as follows.
lower <- c(-Inf,-Inf,-Inf,-Inf,0,0,0,-1,-1,-1)
upper <- c(Inf,Inf,Inf,Inf,Inf,Inf,Inf,1,1,1)
out <- optim(parm,logLik,method='L-BFGS-B',lower=lower,upper=upper,hessian=hessian)
As you can see, I have restricted parameter[5], parameter[6] and parameter[7] to be greater than 0, but the program error is shown in the attached picture ('产生' means 'produce'). The reason for this error seems to be the limit in the function does not work. I don't know why.
Can you help me? Thanks very much!.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: picture.png
Type: image/png
Size: 35455 bytes
Desc: picture.png
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20200726/0dc535e9/attachment.png>
More information about the R-help
mailing list