Learn R Programming

mvmeta (version 0.4.7)

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 $m$-dimensional vector (for univariate models) or $m x k$ matrix (for multivariate models) of outcomes.
S
series of within-study (co)variance matrices of the estimated outcomes for each one of the $m$ studies. Accepted formats by inputna are: a $m$-dimensional list of $k x k$ matrices; a tri-dimensional $k x k x m$ array; a matrix or data frame with $m$ rows and $k(k+1)/2$ or $k$ columns, depending on the availability of the within-study 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)variance matrices. 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

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
# INSPECT THE DATA
head(smoking)

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

# WITH DATA AUGMENTATION
augdata <- inputna(y,S)
y <- augdata[,1:3]
S <- augdata[,-c(1:3)]
model <- mvmeta(y,S)
summary(model)
# 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])
model <- mvmeta(y,S,control=list(inputna=TRUE))
summary(model)
# NOW RIGHT NUMBER OF OBS

Run the code above in your browser using DataLab