Skip to contents

MARS fits meta-analytic models for independent and dependent effect sizes. It covers the analysis from effect-size construction and covariance specification through estimation, inference, diagnostics, and reporting. It also provides specialized models for treatment networks, repeated effects, diagnostic accuracy, and correlation synthesis.

Effect sizes and dependence

Start with compute_es() to calculate effect sizes and sampling variances from study summaries. Use es_methods() to see the supported measures and transform_es() to change effect scales where a conversion is available.

Distinguish sampling covariance from heterogeneity. Sampling covariance describes how estimation errors are related, for instance when two effects share a control group. Heterogeneity describes how the underlying true effects vary. Use compute_es_covariance() to construct sampling covariance blocks for supported designs. In mars(), varcov_type selects the sampling covariance construction and structure specifies the heterogeneity model. The model uses both to weight the evidence.

Core meta-analytic models

Univariate synthesis and meta-regression

Use mars() with a formula for a pooled mean or to relate effects to moderators. Ordinary fits default to restricted maximum likelihood (REML). Maximum likelihood is available. In a univariate model, tau2 = 0 fits a common-effect model, and other fixed values support sensitivity analysis.

Multivariate synthesis

Jointly pool several outcomes or the entries of study correlation matrices. Choose an unstructured between-study covariance, outcome-specific variances with zero covariance, or one common diagonal variance. A diagonal heterogeneity model can still account for correlated sampling errors within a study.

Multilevel synthesis

Use random-effect terms in formula to model variation at different levels, such as effects within studies and studies within districts.

Location-scale meta-regression

Use scale_formula to model how log heterogeneity varies with moderators in supported univariate and multilevel fits. The mean formula specifies how the expected effect changes. The scale formula specifies how much true effects vary.

Specialized models

Repeated effects

Use mars_repeated() for effects measured across outcomes, groups, or follow-up times. It constructs study blocks from explicit working assumptions, such as AR(1) dependence over time or a correlation for effects sharing a control. The mean can vary by outcome, group, time, or supported combinations.

Treatment networks

Use network_meta() to estimate relative treatment effects jointly from direct and indirect evidence under coherence. Choose common-effect weighted least squares or a joint model with a heterogeneity structure suited to the design. Use repeated network models when comparisons span outcomes or times. Use node splitting and design incoherence tests to investigate disagreement across sources of evidence.

Diagnostic accuracy

Use mars_dta() to pool sensitivity and specificity jointly. It supports Gaussian models of study logits and a binomial model for the original counts. Use mars_dta_paired() for two tests applied to the same participants, or mars_dta_thresholds() for one test evaluated at multiple cutoffs. Both support Gaussian and multinomial models. The threshold multinomial model gives monotone predictions across cutoffs.

Correlation, path, and factor models

After pooling correlations with mars(), use path_model(), efa_from_synthesis(), or cfa_from_synthesis() for a downstream analysis. These workflows can propagate uncertainty from the pooled correlations where supported. Use mixed correlation analysis to estimate associations among effect sizes and moderators across studies.

Moderator and bias analyses

Use masmr() to compare methodology-only and joint meta-regressions, mars_lasso() for penalized moderator selection, or mars_rf() to explore nonlinear prediction and variable importance. LASSO and forests provide their own summaries. Ordinary coefficient tests do not account for moderator selection. Use publication_bias() to assess sensitivity to a specified publication-selection model.

Choosing coefficient inference

For supported fits, choose inference in summary() after estimation. This changes uncertainty estimates, tests, or intervals for the mean coefficients while leaving the fitted coefficients and heterogeneity estimates in place. Use matching options in confint() for ordinary MARS and coherent network fits.

Model-based Wald tests

Normal tests use the model covariance and a standard normal reference distribution. For eligible independent univariate fits, test = "t" uses residual degrees of freedom with the same covariance.

Hartung-Knapp-Sidik-Jonkman (HKSJ)

For independent univariate models with constant heterogeneity estimated by ML or REML and inverse-variance GLS weights, HKSJ rescales the coefficient covariance by residual dispersion and uses residual degrees of freedom. The modified version floors the covariance multiplier at one.

Model-based Satterthwaite

Uses the expected information for the covariance parameters to approximate how uncertainty in estimated heterogeneity affects the degrees of freedom of each coefficient or contrast. It requires an identifiable, interior heterogeneity fit. Fixed or boundary estimates do not qualify.

Cluster-robust inference

Uses a sandwich covariance constructed from independent clusters. Keep all dependent rows in the same cluster. Adjustments include CR2 and CR3. Robust Satterthwaite derives degrees of freedom from cluster contributions, a separate calculation from the model-based method. Use robust_wald() for joint coefficient hypotheses when the fitted model contains robust inference information.

See mars_inference_options for the model compatibility table, argument combinations, and estimability requirements. Network and repeated-effects models support model normal, model Satterthwaite, and robust inference where eligible. HKSJ and residual-df model t apply to independent univariate fits. In network models, overrides cover basic coefficients and total treatment contrasts. Direct and indirect tests, incoherence diagnostics, rankings, and predictions use their fitted calculations.

Profiling, resampling, and interpretation

Profile likelihood

Use profile_likelihood() or profile_random_effects() to see how the likelihood changes while a parameter is held fixed and other parameters are reoptimized. Profiles can reveal asymmetry, weak identification, or a variance boundary that a Wald interval may obscure.

Bootstrap and jackknife

Bootstrap refits quantify sampling variability under the chosen resampling design. Jackknife refits show how estimates change when independent units are omitted. The range of omitted-fit estimates is a sensitivity summary. Use mars_alt_estimation() or network_alt_estimation() to run supported refits.

Permutation tests

Use replicate_permutation() for supported independent univariate null tests. The intercept-only test uses sign changes. Moderator permutation tests a global null and requires exchangeability. Network permutation tests are unsupported.

Confidence, prediction, and multiplicity

A confidence interval for a mean effect quantifies uncertainty in that mean. A prediction interval addresses an effect in a new study and accounts for heterogeneity. See network_prediction_intervals() for network contrasts. Holm or Bonferroni adjustment of network contrast p-values leaves their confidence intervals pointwise.

Check residual patterns and influential studies. For dependent effects, consider how results change under plausible sampling covariance assumptions. If you use missing = "em" to complete continuous moderators, standard errors condition on that completion and exclude imputation uncertainty.

See also

Run vignette(package = "mars") to list installed vignettes. See the package website for worked examples.

Author

Maintainer: Brandon LeBeau lebebr01+mars@gmail.com (ORCID)

Authors:

Examples

fit <- mars(school, formula = effect ~ 1, studyID = "study",
            variance = "var", varcov_type = "univariate",
            structure = "univariate")
summary(fit, inference = "model", test = "z")
#> Results generated with MARS:v 0.6.0.8 
#> Friday, November 20, 2026
#> 
#> Model Type: 
#> univariate
#> 
#> Estimation Method: 
#> Restricted Maximum Likelihood
#> 
#> Coefficient covariance: gls
#> Summary inference: model; covariance: gls; test: z; level: 0.95
#> Coefficient/contrast inference only; heterogeneity, scale, prediction and model-fit tests are unchanged. 
#> Optimizer convergence code: 0
#> 
#> 
#> Model Formula: 
#> effect ~ 1
#> <environment: 0x5c66aeaefb00>
#> 
#> Data Summary: 
#> Number of Effect Sizes: 56
#> Number of Fixed Effects: 1
#> Number of Random Effects: 1
#> 
#> Random Components: 
#>       term     var     SD
#>  intercept 0.08844 0.2974
#> 
#> Fixed Effects Estimates: 
#>    attribute estimate      SE z_test  df  p_value   lower  upper
#>  (Intercept)   0.1279 0.04387  2.916 Inf 0.003544 0.04195 0.2139
#> 
#> Model Fit Statistics: 
#>  logLik   Dev   AIC   BIC  AICc
#>  -16.85 33.69 37.69 41.71 38.89
#> 
#> Q Error: 578.864 (55), p < 0.0001
#> 
#> I2 (General): 94.70491
#> 
#> Residual Diagnostics:
#>  Diagnostic                            Value    
#>  Observations                          56       
#>  Finite raw residuals                  56       
#>  Mean raw residual                     -0.007932
#>  SD of raw residuals                   0.3258   
#>  Root mean squared residual            0.323    
#>  Mean absolute residual                0.2463   
#>  Sum of squared Pearson residuals      53.68    
#>  Mean |studentized residual|           0.7463   
#>  Maximum |studentized residual|        3.419    
#>  Proportion |studentized residual| > 2 0.03571  
#>  Proportion |studentized residual| > 3 0.01786  
#> 
#> Normality screen (Shapiro-Wilk, whitened residuals):
#>   N      W   p-value
#>  56 0.9094 0.0004762
summary(fit, inference = "model", test = "hksj",
        hksj_adjust = "modified")
#> Results generated with MARS:v 0.6.0.8 
#> Friday, November 20, 2026
#> 
#> Model Type: 
#> univariate
#> 
#> Estimation Method: 
#> Restricted Maximum Likelihood
#> 
#> Coefficient covariance: gls
#> Summary inference: model; covariance: gls; test: hksj; level: 0.95
#> Hartung-Knapp adjustment: modified; variance multiplier: 1
#> Coefficient/contrast inference only; heterogeneity, scale, prediction and model-fit tests are unchanged. 
#> Optimizer convergence code: 0
#> 
#> 
#> Model Formula: 
#> effect ~ 1
#> <environment: 0x5c66aeaefb00>
#> 
#> Data Summary: 
#> Number of Effect Sizes: 56
#> Number of Fixed Effects: 1
#> Number of Random Effects: 1
#> 
#> Random Components: 
#>       term     var     SD
#>  intercept 0.08844 0.2974
#> 
#> Fixed Effects Estimates: 
#>    attribute estimate      SE t_test df p_value   lower  upper
#>  (Intercept)   0.1279 0.04387  2.916 55 0.00512 0.04001 0.2158
#> 
#> Model Fit Statistics: 
#>  logLik   Dev   AIC   BIC  AICc
#>  -16.85 33.69 37.69 41.71 38.89
#> 
#> Q Error: 578.864 (55), p < 0.0001
#> 
#> I2 (General): 94.70491
#> 
#> Residual Diagnostics:
#>  Diagnostic                            Value    
#>  Observations                          56       
#>  Finite raw residuals                  56       
#>  Mean raw residual                     -0.007932
#>  SD of raw residuals                   0.3258   
#>  Root mean squared residual            0.323    
#>  Mean absolute residual                0.2463   
#>  Sum of squared Pearson residuals      53.68    
#>  Mean |studentized residual|           0.7463   
#>  Maximum |studentized residual|        3.419    
#>  Proportion |studentized residual| > 2 0.03571  
#>  Proportion |studentized residual| > 3 0.01786  
#> 
#> Normality screen (Shapiro-Wilk, whitened residuals):
#>   N      W   p-value
#>  56 0.9094 0.0004762
summary(fit, inference = "robust", cluster = "district",
        robust_type = "CR2", test = "Satterthwaite")
#> Results generated with MARS:v 0.6.0.8 
#> Friday, November 20, 2026
#> 
#> Model Type: 
#> univariate
#> 
#> Estimation Method: 
#> Restricted Maximum Likelihood
#> 
#> Coefficient covariance: gls
#> Summary inference: robust; covariance: CR2; test: Satterthwaite; level: 0.95
#> Coefficient/contrast inference only; heterogeneity, scale, prediction and model-fit tests are unchanged. 
#> Optimizer convergence code: 0
#> 
#> 
#> Model Formula: 
#> effect ~ 1
#> <environment: 0x5c66aeaefb00>
#> 
#> Data Summary: 
#> Number of Effect Sizes: 56
#> Number of Fixed Effects: 1
#> Number of Random Effects: 1
#> 
#> Random Components: 
#>       term     var     SD
#>  intercept 0.08844 0.2974
#> 
#> Fixed Effects Estimates: 
#>    attribute estimate     SE t_test    df p_value    lower upper
#>  (Intercept)   0.1279 0.0782  1.636 7.373  0.1437 -0.05509 0.311
#> 
#> Model Fit Statistics: 
#>  logLik   Dev   AIC   BIC  AICc
#>  -16.85 33.69 37.69 41.71 38.89
#> 
#> Q Error: 578.864 (55), p < 0.0001
#> 
#> I2 (General): 94.70491
#> 
#> Residual Diagnostics:
#>  Diagnostic                            Value    
#>  Observations                          56       
#>  Finite raw residuals                  56       
#>  Mean raw residual                     -0.007932
#>  SD of raw residuals                   0.3258   
#>  Root mean squared residual            0.323    
#>  Mean absolute residual                0.2463   
#>  Sum of squared Pearson residuals      53.68    
#>  Mean |studentized residual|           0.7463   
#>  Maximum |studentized residual|        3.419    
#>  Proportion |studentized residual| > 2 0.03571  
#>  Proportion |studentized residual| > 3 0.01786  
#> 
#> Normality screen (Shapiro-Wilk, whitened residuals):
#>   N      W   p-value
#>  56 0.9094 0.0004762