-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I am experiencing an error in a call to ergmm using a nodecov term.
Error in optim(par = start.vals, fn = optim.fs[["f"]], gr = optim.fs[["grad.f"]], : L-BFGS-B needs finite values of 'fn'Where I tracked it down to latentnet:::ergmm.lpY and specifically this line
Line 89 in 09ba175
| lpY<-if(up.to.const) lpYc.fs[[model[["familyID"]]]](Ym[obs],eta[obs],dispersion=theta[["dispersion"]],model[["fam.par"]]) else lpY.fs[[model[["familyID"]]]](Ym[obs],eta[obs],dispersion=theta[["dispersion"]],model[["fam.par"]]) |
That list returns a function that is a formula Y * eta - exp(eta) and at least one value in my eta exceeds .Machine$double.xmax when exponentiated. I'm not familiar enough with the method to know what eta is exactly, but on my machine the largest integer that can be exponentiated is exp(709) before it returns Inf. In my data the largest value for eta was 6842.
The call would complete if I rescaled the original data to be in a range about 100 times smaller than the original.
Metadata
Metadata
Assignees
Labels
No labels