Learn R Programming

mvmeta (version 1.0.3)

inputna: Input Missing Values

Description

This function augment data by replacing missing values. It can be used internally in mvmeta through the control list.

Usage

inputna(y, S, inputvar=10^4)

Arguments

y

a \(n\)-dimensional vector (for univariate models) or \(m \times k\) matrix (for multivariate models) of outcomes.

S

series of within-unit variances (or (co)variance matrices for multivariate models) of the estimated outcome(s). For univariate models, this is usually a \(n\)-dimensional vector. For multivariate models, it can be provided as: a \(m\)-dimensional list of \(k \times k\) matrices; a tri-dimensional \(k \times k \times m\) array; a matrix or data frame with \(n\) rows and \(k(k+1)/2\) or \(k\) columns, depending on the availability of the within-unit correlations.

inputvar

multiplier for inputting the missing variances in S.

Value

A matrix with the first \(k\) column corresponding to the augmented outcomes, and the remaining \(k(k+1)/2\) or \(k\) columns (depending on the availability of the within-study covariances) corresponding to vectorized entries of the lower triangle of the related (co)variance matrices.

Details

The function augments the data by replacing missing values in the outcomes and the associated (co)variances. Specifically, it replaces missing outcomes and missing covariances (if provided) with 0, and missing variances with the largest observed variance multiplied by inputvar. This value is expected to be very high, by default \(10^4\), so that the corresponding observation contributes only negligibly to the final estimate.

References

Sera F, Armstrong B, Blangiardo M, Gasparrini A (2019). An extended mixed-effects framework for meta-analysis.Statistics in Medicine. 2019;38(29):5429-5444. [Freely available here].

Gasparrini A, Armstrong B, Kenward MG (2012). Multivariate meta-analysis for non-linear and other multi-parameter associations. Statistics in Medicine. 31(29):3821--3839. [Freely available here].

Jackson D, Riley R, White IR (2011). Multivariate meta-analysis: Potential and promise. Statistics in Medicine. 30(20);2481--2498.

White IR (2009). Multivariate random-effects meta-analysis. Stata Journal. 9(1):40--56.

White IR (2011). Multivariate random-effects meta-regression: updates to mvmeta. Stata Journal. 11(2):255-270.

See Also

See inputcov for inputting (co)variance matrices.

Examples

Run this code
# NOT RUN {
# INSPECT THE DATA
head(smoking)

# STANDARD APPROACH TO MISSING DATA
y <- as.matrix(smoking[11:13])
S <- as.matrix(smoking[14:19])
mod1 <- mvmeta(y, S)
summary(mod1)

# WITH DATA AUGMENTATION
augdata <- inputna(y, S)
y <- augdata[,1:3]
S <- augdata[,-c(1:3)]
mod2 <- mvmeta(y, S)
summary(mod2)
# NB: SAME PARAMETER ESTIMATES, BUT WRONG NYUMBER OF OBS

# USED INTERNALLY IN mvmeta
y <- as.matrix(smoking[11:13])
S <- as.matrix(smoking[14:19])
mod3 <- mvmeta(y, S, control=list(inputna=TRUE))
summary(mod3)
# NOW RIGHT NUMBER OF OBS
# }

Run the code above in your browser using DataLab