Open Quentin62 opened 3 years ago
The error occurs when nClass = 1
. The parameters are estimated but output criterion are:
$lnObservedLikelihood
[1] NaN
$lnCompletedLikelihood
[1] -Inf
$BIC
[1] NaN
$ICL
[1] -Inf
The problem comes from individuals 43 et 102, the observed loglikelihood is -inf
The parameters are:
k: 1, mean 0.05851658
k: 1, sd 0.32023988
and the individuals 43 and 102 are "[2.99:3.01]" "[3.99:4.01]"
the computed probability is 0 and so the loglikelihood is -Inf
idea: add an epsilon in the probabiblity computation function for some models (the ones that can't have a real 0: gaussian, weibull...)
data.zip
an R error is generated:
the error comes from in RMixtCompIO:
If all warnlog are null then
logLikelihood
should be a vector of-Inf
and this should not generate an error forwhich.max