[R] about L-BFGS-B
@pencer@gr@ve@ @end|ng |rom e||ect|vede|en@e@org
Sun Aug 15 14:49:42 CEST 2021
Hello 최병권 <bgchoy using snu.ac.kr>:
Are you familiar with the "debug" function? "debug(glm.cmp)"
followed by the problem command will put you into the environment of
"glm.cmp", and you can walk through that function line by line looking
at each variable.
If you need more help, "PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html and provide commented,
minimal, self-contained, reproducible code."
Also, am I correct that this glm.cmp function is in the COMPoissonReg
package? If yes, have you tried contacting the maintainer of that
package (Andrew Raim <andrew.raim at gmail.com>?)? If you can't solve
your problem using "debug(glm.cmp)" AND you have NOT yet asked the
package maintainer with "commented, minimal, self-contained,
reproducible code." They might like to have that example to make the
code easier to use, e.g., by giving a more informative error message.
Hope this helps,
On 8/15/21 7:26 AM, J C Nash wrote:
> 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.
> 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