Summarises how estimates and p-values vary across the specifications of a multiverse, separately for each response x coefficient.
Arguments
- x
a
pimaobject, apima.multiobject created withfit.specs, a list of fittedlmorglmmodels, or a table returned byspec_table().- xvar
column of the specification table to summarise (e.g.
"pcor","estimate").- p.adjusted
which p-values to use, with the same rules as
spec_curve(): forpimaobjectsTRUEuses the adjusted p-values,FALSEthe unadjusted flipscores ones andNULL(default) the adjusted ones whenpima()applied a correction; for lists of models andpima.multiobjects only the unadjusted Wald p-values exist ("wald.p") andTRUEis an error.- q
probabilities for the quantiles; the extremes define the amplitudes and the Janus effect.
- type
"additive"(difference) or"ratio"(exp of the difference, only withxvar = "estimate").- null
value under the null hypothesis on the scale of
xvar(0 forestimate,pcorandz).- alpha
significance level.
- decompose_variance
if
TRUE, addsvoe_variance().- focal, focal.var
coefficients and variables to consider, as in
spec_curve(); by default the tested coefficients (pima), the focal predictors (pima.multi) or all the coefficients except the intercept. Each selected coefficient is a separate association.- which.response
responses to consider; defaults to all.
- p
column of p-values of the specification table (e.g. one added with
stats::p.adjust()). IfNULL, chosen with the rules ofp.adjusted.
Value
An object of class pima_voe: a list with summary (one row per
response x coefficient), quantiles (long format), the settings used and,
optionally, variance.
Details
Let \(x_s\) be the value of xvar and \(p_s\) the p-value of
specification \(s\), \(Q_q\) the \(q\)-th quantile across the
specifications and \(q_1 < q_2\) the extremes of q. For each
association the function returns the quantiles of \(x_s\) and of
\(-\log_{10} p_s\), the amplitudes
$$x_{\mathrm{voe}} = Q_{q_2}(x) - Q_{q_1}(x), \qquad p_{\mathrm{voe}} = Q_{q_2}(-\log_{10} p) - Q_{q_1}(-\log_{10} p)$$
(p_voe is the relative p-value of Patel et al. (2015)
),
and the Janus effect definitions (see janus()).
type = "ratio" requires xvar = "estimate": the ratio of the extreme
quantiles of exp(estimate) equals exp() of their difference on the link
scale (the relative hazard or odds ratio of Patel et al. (2015)
),
that is \(\exp(x_{\mathrm{voe}})\). It is interpretable only for log,
logit and cloglog links. Quantiles are always returned on the scale of
xvar.
References
Patel CJ, Burford B, Ioannidis JPA (2015). “Assessment of Vibration of Effects due to Model Specification Can Demonstrate the Instability of Observational Associations.” Journal of Clinical Epidemiology, 68(9), 1046–1058. doi:10.1016/j.jclinepi.2015.05.029 .
See also
Other vibration of effects:
janus(),
voe_variance(),
volcano()
Examples
multi <- create_multi(
Sepal.Width ~ Sepal.Length + Petal.Width + Species,
data = iris,
focal = "Sepal.Length",
nfuns = "log",
fit.specs = list(lm = lm)
)
voe(multi)
#> Vibration of effects (xvar = pcor, type = additive, p-values = wald.p, alpha = 0.05)
#>
#> response coefficient n_spec x_voe p_voe J_range J_pct J_ext J_sig J_frac
#> Sepal.Width Sepal.Length 6 0.623 10.3 TRUE TRUE FALSE FALSE 0.833
voe(multi, xvar = "estimate", decompose_variance = TRUE)
#> Vibration of effects (xvar = estimate, type = additive, p-values = wald.p, alpha = 0.05)
#>
#> response coefficient n_spec x_voe p_voe J_range J_pct J_ext J_sig J_frac
#> Sepal.Width Sepal.Length 6 0.394 10.3 TRUE TRUE FALSE FALSE 0.833
#>
#> Variance decomposition:
#> response coefficient term source r2u pr2u r2u_inclusion
#> Sepal.Width Sepal.Length Petal.Width predictor 0.295 0.607 0.279
#> Sepal.Width Sepal.Length Species predictor 0.191 0.393 0.191
#> r2u_transformation
#> 0.0158
#> 0.0000