Common warnings and errors

František Bartoš

2020-07-31

The package can produce many warnings or error messages. Here, we discuss their meaning and how to resolve the most common ones.

Installation problems

The package contains C++ code that implements the weighted-t distributions for JAGS. As a result, there might be problems with the package installation when JAGS is not installed at the default directory. We tried to use the same way of locating JAGS installation as the runjags package. If you managed to successfully install runjags, the same steps should help to install RoBMA.

full precision may not have been achieved in ‘pnt{final}’

This message is completely harmless and (unfortunately) cannot be muted (apart from suppressing all output by adding silent = TRUE to the control argument). It is generated by the cumulative probability density function of t-distribution implemented in R’s C math library. The function is called from JAGS to normalize the probability density function of the weighted t-distribution. In many cases, the cumulative probability between two p-values cut-offs can be very close to zero, resulting in a warning. In those cases a zero probability for the current interval might be returned, however, the difference from the true value is negligible. The package also provides a version of the probability density function of the weighted t-distribution that uses a higher precision C++ boost library. This higher precision calculation can be turned on by setting boost = TRUE to the control argument. However, the fitting time will be increased by more than two times.

Model’s X initial fit failed due to incompatible starting values (most likely due to an outlier in the data and limited precision of t-distribution). Starting values for the mean parameter were therefore set to the mean of supplied data.

This message is also harmless and indicates that the starting values generated by the specified prior distributions could not be used. In some cases, the likelihood cannot be evaluated at the original starting value because the data are too far from values implicated by the data. This can be usually resolved by changing the starting values for the mean parameter to the mean of supplied data - which is automatically done by the RoBMA() function. The only disadvantage is the lower variability of the chains starting position. Another option might be to using higher precision distributions implemented in boost C++ library. That can be achieved by setting boost = TRUE to the control argument, however, it will result in more than two times longer fitting times. You can access overview of the MCMC convergence by using summary(fit, type = "models", diagnostics = TRUE) or check the MCMC diagnostics plot for any parameter of any model by using diagnostics() function. For example, to plot a traceplot of mean parameter of the sixth model, use diagnostics(fit, parameter = "mu", type = "chain", show_models = 6)).

Model’s X initial fit failed due to incompatible starting values (most likely due to an outlier in the data and limited precision of t-distribution). The model was refitted using boost likelihood function.

This message is very similar to the previous one. It is generated if a change in the starting values for the mean parameter was not sufficient and the function resolved to use a higher precision boost library (and using the changed starting values). As a result, the model takes longer to estimate. All information provided in the previous paragraph applies here too. Please, contact me at f.bartos[at]gmail.com in case that even using a boost likelihood function did not result in successful model estimation.

Some of the models failed to converge. However, there were other models with the same combination of presence/absence of effect/heterogeneity/publication bias and their prior probability was increased to account for the failed models.

This message indicates that one of the models failed to converge. In this case, the default behavior is to check the remaining models and increase the prior probability of those models whose prior distributions were specified within the same categories as the failed model. For example, with the default settings RoBMA() fits two models that assume effect, heterogeneity, and publication bias (one with two-step weight function and second with three-step weight function). If one of those models fails to converge (assuming estimation difficulties not associated with the likelihood of the model), the RoBMA() function automatically transfers the prior model probability to the remaining model, keeping the prior model probabilities for each component balanced. This setting can be overridden by setting the balance_prob = FALSE in the control argument. If the model is already fitted, you can still change the prior model probabilities of individual models by using the update.RoBMA() function and specifying a prior_odds argument with a numeric vector of prior odds of individual models and setting refit_failed = FALSE. Another option is trying to refit the failed models with an increased number of iterations, burnin, adapt, or thin settings by again using the update.RoBMA() function and changing the corresponding settings. Note that only the failed models will be refitted.

Some of the models failed to converge and their prior probability couldn’t be balanced over models with the same combination of presence/absence of effect/heterogeneity/publication bias since they don’t exist.

This message is very similar to the previous one, however, there were no other models whose prior distributions were specified within the same categories as the failed model. As a result, the prior probability of the failed model could not be transferred. For example, with the default settings RoBMA() fits one model that assumes effect, heterogeneity, and no publication bias. If this model cannot be estimated, there is no other model that could be used to balance the prior probability of the model components. As a result, the prior probability of the failed model is spread equally across all fitted models. All information regarding solving this problem provided in the previous paragraph applies here too.

Other problems

Please file a GitHub issue at https://github.com/FBartos/RoBMA/issues or contact me at f.bartos[at]gmail.com in case of any other problems.