When calling summary on a mediate object, the underlying code uses the printCoefmat method. By default, this assumes the results of the second-last column (i.e. the upper-confidence interval here) are a test statistic, which is reported with less precision than other values such the lower confidence interval. That is inconsistent between the bounds, but can also lead to rounding to 0, which can lead to inconsistencies between the confidence intervals and the p-values. For instance
It would be better if the upper confidence interval had the same precision as the lower CI. An easy fix (I believe) is to indicate that there is no test statistic, replacing all calls to printCoefmat to
printCoefmat(smat, tst.ind=NULL)
Removing the digits=3 argument that is used at the moment also allows the digits to be controlled by the general options, rather than hardcoded. E.g.
When calling
summary
on amediate
object, the underlying code uses theprintCoefmat
method. By default, this assumes the results of the second-last column (i.e. the upper-confidence interval here) are a test statistic, which is reported with less precision than other values such the lower confidence interval. That is inconsistent between the bounds, but can also lead to rounding to 0, which can lead to inconsistencies between the confidence intervals and the p-values. For instanceIt would be better if the upper confidence interval had the same precision as the lower CI. An easy fix (I believe) is to indicate that there is no test statistic, replacing all calls to
printCoefmat
toRemoving the
digits=3
argument that is used at the moment also allows the digits to be controlled by the general options, rather than hardcoded. E.g.