[R] A question about optim function in R
jr@| @end|ng |rom po@teo@no
Sun Jul 26 19:08:55 CEST 2020
On 2020-07-26 07:36 -0700, Jeff Newmiller wrote:
> On July 26, 2020 7:33:32 AM PDT, Zixuan Qi <zixuan.qi using duke.edu> wrote:
> > 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)
Can you include parm?
> > As you can see, I have restricted
> > parameter, parameter and
> > parameter 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!.
> This is not reproducible.
>  http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
>  http://adv-r.had.co.nz/Reproducibility.html
>  https://cran.r-project.org/web/packages/reprex/index.html (read the vignette)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the R-help