You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mydists <- list(a="poisson",
b="poisson")
a <- rpois(1000, lambda = 1)
z <- exp(1+2*a)
b <- rpois(1000, lambda = z)
mydf <- data.frame("a" = a,
"b" = as.integer(b))
We can estimate the following model:
glm(b~a, data = mydf, family = "poison")
Problem 1
A similar behaviour as from glm() should be expected from buildScoreCache
> mycache.mle <- buildScoreCache(data.df = mydf,
+ data.dists = mydists,
+ method = "mle",
+ max.parents = 1,
+ verbose = TRUE)
evaluation # 1:
$row.num
[1] 1
result of evaluating expression:
[1] -1302.247 2606.494 2611.402 2612.095
got results for task 1
numValues: 1, numResults: 1, stopped: FALSE
returning status FALSE
evaluation # 2:
$row.num
[1] 2
result of evaluating expression:
[1] -1263.188 2530.377 2540.193 2541.579
got results for task 2
numValues: 2, numResults: 2, stopped: FALSE
returning status FALSE
evaluation # 3:
$row.num
[1] 3
result of evaluating expression:
[1] -Inf Inf Inf Inf
got results for task 3
numValues: 3, numResults: 3, stopped: FALSE
returning status FALSE
evaluation # 4:
$row.num
[1] 4
result of evaluating expression:
<std::runtime_error: solve(): solution not found>
got results for task 4
accumulate got an error result
numValues: 4, numResults: 4, stopped: FALSE
returning status FALSE
numValues: 4, numResults: 4, stopped: TRUE
first call to combine function
evaluating call object to combine results:
fun(result.1, result.2, result.3)
Error in { : task 4 failed - "solve(): solution not found"
In addition: Warning messages:
1: In check.valid.groups(group.var = group.var, data.df = data.df, :
No cor.vars specified. Using all but group.var instead.
2: In check.valid.groups(group.var = group.var, data.df = data.df, :
No cor.vars specified. Using all but group.var instead.
3: In check.valid.buildControls(control = control, method = method, :
Control parameters provided that are not used with method mle are ignored.
The error seems to come from irls_poisson_fast.cpp() which can not find solutions for all possible combinations.
Why does glm() work but buildScoreCache doesn't?
1st priority: Have similar behaviour as glm.
2nd priority: Can we at least return a more informative error message?
Problem 2
If a is wrongly provided as
a <- runif(1000, min=1, max=2.5)
but is still specified in data.dists=list(a="poisson"...); this is not catched anywhere and results in a silent (nothing written to syslog, dmesg, debug, ... and also no special behaviour detected in htop) crash of the R session.
No description provided.
The text was updated successfully, but these errors were encountered: