Description Usage Arguments Details Value Author(s) See Also Examples
These method functions exclude rows corresponding to studies with invalid missing pattern from model frames of class "data.frame.mvmeta". This guarantees the correct handling of missing values while fitting multivariate and univariate meta-analytical models.
1 2 3 4 5  | ## S3 method for class 'data.frame.mvmeta'
na.omit(object, ...)
## S3 method for class 'data.frame.mvmeta'
na.exclude(object, ...)
 | 
object  | 
  an object of class   | 
...  | 
 further arguments passed to or from other methods.  | 
A model frame of class "data.frame.mvmeta" is produced by mvmeta. A call to na.omit or na.exclude removes from the model frame the rows corresponding to studies with invalid missing pattern. In addition, a na.action attribute is added to the model frame, namely a numeric vector corresponding to the removed rows and class "omit" or "exclude", respectively. This information is used by naresid and napredict to deal with missing values in functions such as fitted, residuals, predict and blup, among others.
The definition of missing, identifying an invalid missing pattern, is different in multivariate meta-analytical models performed through mvmeta if compared to other regression functions such as lm or glm. Specifically, while a study is removed if at least an observation for one predictor is missing, partially missing outcomes do not prevent the study to contribute to estimation (see mvmeta). Specific methods na.omit and na.exclude for class "data.frame.mvmeta" allow  this different definition.
These functions returns the model frame object with rows corresponding to studies with invalid missing pattern being removed. They also add the related na.action attribute as explained above.
Antonio Gasparrini, antonio.gasparrini@lshtm.ac.uk
See na.action, naresid and napredict. See model.frame.
See mvmeta-package for an overview of the package and modelling framework.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  | # INPUT MISSING VALUES IN PREDICTOR AND ONE RESPONSE
data <- berkey98
data[2,1] <- data[4,3] <- NA
data
# RUN THE MODEL
model <- mvmeta(cbind(PD,AL)~pubyear,S=data[5:7],data=data,method="ml")
# SUMMARIZE: NOTE THE NUMBER OF STUDIES AND OBSERVATIONS
summary(model)
df.residual(model)
# EXTRACT THE MODEL FRAME WITH na.pass
model.frame(model,na.action="na.pass")
# EXTRACT THE MODEL FRAME WITH na.omit (DEFAULT)
model.frame(model,na.action="na.omit")
# COMPARE WITH DEFAULT METHOD FOR na.omit
frame <- model.frame(model,na.action="na.pass")
na.omit(frame)
class(frame)
class(frame) <- "data.frame"
na.omit(frame)
# WITH na.exclude
residuals(model)
residuals(update(model,na.action="na.exclude"))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.