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
returns a negative value. This could happen if the likelihood of the more complex model is almost identical to the likelihood of the null model. In using this package, it could be that one of the possible predictors is so bad that this happens.
This was fixed in#ce6cc01 by taking the absolute value of the resulting CNR2 before taking the square root. This is not the most elegant solution. You could instead use some numerical trick. For example:
Check if the difference univ_mods$lls - univ_mods$ll0 is smaller than floating point precision. If so, just set CNR2 to zero.
After computing CNR2, check if it is less than 0. If so, set it to 0.
Can also think of other transformations of the value to make things more stable (add values, multiple, take logs) and then reverse later.
The text was updated successfully, but these errors were encountered:
In
cp_thrs_PR2()
, it can happen that:CNR2 <- 1 - exp(-2 / nrow(ivs) * (univ_mods$lls - univ_mods$ll0))
returns a negative value. This could happen if the likelihood of the more complex model is almost identical to the likelihood of the null model. In using this package, it could be that one of the possible predictors is so bad that this happens.
This was fixed in #ce6cc01 by taking the absolute value of the resulting CNR2 before taking the square root. This is not the most elegant solution. You could instead use some numerical trick. For example:
univ_mods$lls - univ_mods$ll0
is smaller than floating point precision. If so, just setCNR2
to zero.CNR2
, check if it is less than 0. If so, set it to 0.The text was updated successfully, but these errors were encountered: