For the first stage of a two-stage multivariate IPD meta-analysis, standard regression methods (e.g. linear, logistic and Cox) can be applied to the IPD in each trial separately to obtain effect estimates and their variances for each trial, and their correlations.
The Stata package mvmeta_make automates the derivation of effect estimates, their within-trial variances and correlations for each trial, ready for the second stage. However, this package only applies to the special situation where the ‘outcomes’ are multiple parameter estimates from the same regression model (e.g. intercepts and slopes in a regression model).
Otherwise, bootstrapping can be used to obtain within-trial correlations, which generally requires user-written code, or to fit joint (‘seemingly unrelated’) regression models for the outcomes and extract the correlations post-estimation.
As an example, consider estimating a non-linear relationship, as seen in Chapter 7 for interactions or in Chapter 16 for prognostic effects. Specifically, we consider the example in equation (16.3) and Figure 16.4. In the first stage we estimate a spline function for microvessel density (mvd), and in the second stage we pool this spline function using mvmeta in Stata.
* generate a spline function, for example here for microvessel density (mvd)
mkspline2 mvdspline=mvd, cubic nknots(4) displayknots
* first stage: generate estimates of the spline function for each study separately and save the results in file AD
mvmeta_make stcox mvdspline* agespline* dummystage2 dummystage3 , by(source) ppfix(none) saving(AD, replace)
* the AD datasets contains the estimates (y), variances and covariances (S) of the parameters of interest
* second stage: apply a multivariate random effects model to the spline function for mvd
use AD, replace
mvmeta y S, vars(ymvdspline1 ymvdspline2 ymvdspline3)