[R] about L-BFGS-B
J C Nash
pro|jcn@@h @end|ng |rom gm@||@com
Sun Aug 15 14:26:42 CEST 2021
You have the answer in the error message: the objective function has
been calculated as +/-Inf somehow. You are going to have to figure
out where the function is computed and why it is not finite.
On 2021-08-15 12:41 a.m., 최병권 wrote:
> Hello Dear,
> I am Choy from Seoul.
> I have a question about R
> Is it possible to answer the error that occurred while executing R?
> I am currently doing zero inflated regression because the data follows a
> poisson distribution.
> However, for glm.c <http://glm.cm>mp (rndclass ~ CR4), the results are
> normally displayed, but when an independent variable is added, the
> following error message is displayed:
> #Error in optim(par.init, loglik, method = optim.method, control =
> optim.control, :
> L-BFGS-B needs finite values of 'fn'
> I can't solve it, but I'd appreciate it if you could help.
> For reference, the estimated regression equation is attached below.
> # A CMP example with offset terms
> cmp.m3 = glm.cmp(rndclass ~ CR4 + offset(CR4), data=dta) -(1)
> # A ZICMP example with offset terms.
> zicmp.m4 = glm.cmp(rndclass ~ CR4+offset(CR4),
> formula.nu = ~ offset(CR4),
> formula.p = ~ CR4+offset(CR4), data=dta) -(2)
> # dependent variable:
> 0 1 2 3
> 12398 1290 11341 109
> Thank you
> [[alternative HTML version deleted]]
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help