Shared data-input arguments used by the RoBMA fitting functions.
Normal models use approximate effect-size estimates supplied through
yi with either vi or sei. GLMM models use the raw two-arm count
arguments for binomial (measure = "OR") or Poisson (measure = "IRR")
outcomes.
Arguments
- yi
a vector of effect sizes, or a formula with the effect size on the left-hand side and location moderators on the right-hand side (for example
yi ~ x1 + x2). If a formula is supplied,modsmust not be specified. See data_input for the supported ranges of effects and sampling SEs.- vi
a vector of sampling variances. Either
viorseimust be supplied for normal models.- sei
a vector of standard errors. Either
viorseimust be supplied for normal models.- V
a known working variance-covariance matrix, a list of block variance-covariance matrices, or an exact diagonal-plus-factor declaration created by
known_v_factor(), used bybrma.mv(). Ordinary covariance matrices frommetafor::vcalc()can be supplied directly. Product selection requires no publication groups. For best-p-value selection, declare groups separately withselection_model(weight_rule = "best", group = ...). Matrix symmetry uses base R's numerical tolerance. Accepted matrices are stored symmetrically by averaging off-diagonal pairs; the supplied object and its diagonal are unchanged. Dependency blocks that are block constant on nested partitions are represented exactly as a diagonal-plus-factor structure without aknown_v_factor()declaration. Dimensions and row alignment are checked on the complete input; when rows are dropped (subsetor missing values), the numerical covariance checks apply to the retained rows only, so acceptance says nothing about the entries of the dropped rows.- known_v_parameterization
known-
Vbackend used bybrma.mv()."auto"chooses an exact backend when feasible;"latent"uses a latentD + BB'decomposition;"whitened"uses an eigen-rotated normal likelihood;"block_mvn"uses an exact native block multivariate-normal likelihood.- weights
an optional vector of finite positive likelihood weights. For normal/effect-size models, each weight powers the estimate likelihood. For constructors with GLMM raw-count input, each weight powers the paired two-arm likelihood for one study. An integer weight \(w\) repeats that conditional likelihood contribution \(w\) times, with the declared latent-effect and grouping structure held fixed. Positive fractional likelihood powers are also supported.
- ni
an optional vector of sample sizes. Used for
measure = "GEN"or when estimating the unit information standard deviation.- mods
an optional matrix, data.frame, or formula specifying location moderators (meta-regressors). Formula input is evaluated in
dataand supports explicit columns and standard formula operators, including^as R's crossing operator with a literal whole exponent of at least 2:(x + z)^2expands tox + z + x:z, andx^2is not a quadratic term (x + x^2isx). Precompute transformed predictors, such as a squared predictor, as columns indata; inline calls such asI(),poly(), spline constructors, and user functions are not supported.- scale
an optional matrix, data.frame, or formula specifying scale predictors for location-scale models. Formula input is evaluated in
dataand follows the same explicit-column formula grammar asmods. Random-formula models also accept a named list targeting top-level random components or concrete random-effect blocks; seebrma.mv().- random
an optional formula or list of formulas specifying BayesTools random-effect terms for
brma.mv(). Use random-effect formula structure tags such asdiag(),us()/un(),cs(),hcs(),ar1()/ar(),har(), orcar()inside the formula. Plain(expr | group)syntax uses an unstructured random-coefficient block;expr || groupuses a diagonal block. The coefficient-formula and structured-index tag families have different left-side semantics; see the linked documentation. A bare formula or unnamed one-entry list has no redundant component prefix. An explicitly named one-entry list retains its name; lists with two or more entries generate missing names ascomponent 1,component 2, and so on.- cluster
an optional vector of cluster identifiers for multilevel meta-analysis.
- data
an optional data frame containing the variables.
- slab
an optional vector of study labels.
- bias_exempt
an optional logical vector with one value per original outcome row. A
TRUErow stays in the analysis with zero PET/PEESE offset. Under product selection, its weight is one. Under best-p-value selection, only nonexempt outcomes compete to determine the publication's weight. A fully exempt publication has weight one. An exempt outcome can still be associated with selection through its correlation with a nonexempt outcome. Omission is equivalent to allFALSE. The indicator must be nonmissing on rows retained for analysis.- subset
an optional logical or numeric vector specifying a subset of data to be used. Subsetting precedes missing-row removal; retained-row outcome and predictor checks follow these steps. Type, shape, and existing extraction checks can still reject malformed inputs before subsetting. Row selection (by
subsetor missing-row removal) drops factor levels left without rows frommods,scale, and random-effect grouping factors. The index variable of a structured random-effect term (cs(),hcs(),ar1(),har()with one index variable) keeps its declared levels, which define the covariance structure; the variables of a multi-variablecs(a + b | group)index follow the ordinary rule, because that index is built from their observed combinations. If an index variable that keeps its levels is also used inmodsorscaleand loses one of its levels to the selection, the fit stops with an error of classRoBMA_structured_index_level_removed(alsoRoBMA_data_error); remove the level from the data withdroplevels()or use a separate column for the moderator.- measure
a character string specifying the effect size measure. Normal/effect-size constructors require an explicit value and support
"SMD","ZCOR","RR","OR","HR","RD","IRR", and"GEN". Use"GEN"only for general effect sizes without a known unit information standard deviation. GLMM raw-count constructors support only"OR"and"IRR"and default to"OR".- effect_direction
direction used by publication-bias adjustments.
"positive"assumes statistically significant positive estimates are more likely to be selected;"negative"mirrors the selection direction;"detect"infers the direction from the fitted data.- ai
a vector of the number of events in the treatment or experimental group for binomial GLMM models.
- bi
a vector of the number of non-events in the treatment or experimental group for binomial GLMM models.
- ci
a vector of the number of events in the control group for binomial GLMM models.
- di
a vector of the number of non-events in the control group for binomial GLMM models.
- n1i
a vector of the sample size in the treatment or experimental group. If omitted for binomial GLMMs, it is computed as
ai + bi.- n2i
a vector of the sample size in the control group. If omitted for binomial GLMMs, it is computed as
ci + di.- x1i
a vector of the number of events in the treatment/experimental group (for Poisson data).
- x2i
a vector of the number of events in the control group (for Poisson data).
- t1i
a vector of the person-time in the treatment/experimental group.
- t2i
a vector of the person-time in the control group.
Supported numerical range
For retained Gaussian observations, the absolute effect estimate and the
sampling standard error can be at most 1,000 for named effect measures and
\(10^9\) for "GEN". Positive sampling standard errors must be at least
\(10^{-6}\). These inclusive limits apply on the analysis scale, including
the log scale for ratio measures, and use the marginal SE for covariance
input. Zero and arbitrarily small effect estimates are valid. Predictions
that admit exactly zero sampling variance retain that boundary.
When both vi and sei are supplied, each retained value must meet
its own bounds (squared SE limits for vi). Where both are present
they must agree to double precision. The analysis uses the supplied
variance, completing missing variances from the supplied SEs.
An out-of-range finite value raises RoBMA_data_outside_numerical_domain
(a RoBMA_data_error) with the original row, quantity and value.
For general effects, change units consistently for estimates, SEs,
covariances, outcome-scale priors and any supplied prior_unit_information_sd.
For named measures, verify the measure, transformation and sampling
uncertainty. These are practical
input limits. Priors retain their specified support.