Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/model.frame.mvmeta.R
These method functions return the model frame and design matrix for univariate or multivariate meta-analytical models represented in objects of class "mvmeta".
| 1 2 3 4 5 | ## S3 method for class 'mvmeta'
model.frame(formula, ...)
## S3 method for class 'mvmeta'
model.matrix(object, ...)
 | 
| object, formula  |  an object of class  | 
| ...  | further arguments passed to or from other methods. | 
The model frame is produced by mvmeta when fitting the meta-analytical model, and stored in the mvmeta object if argument model=TRUE. Alternatively, the model frame is directly returned by mvmeta with argument method="model.frame". The method function model.frame simply extracts the saved model frame if available, or otherwise evaluates a call to mvmeta when method="model.frame".
The method function model.matrix extracts the design matrix from a fitted meta-analytical model. It first extract the model frame by calling model.frame, and then passes the call to the default method.
These methods functions are similar to those provided for regression objects lm and lm.
For model.frame, a data.frame with special attributes (see the default method model.frame) and the additional class "data.frame.mvmeta".
For model.matrix, the design matrix used to fit the model.
The reason why these specific method functions are made available for class mvmeta, and in particular why a new class "data.frame.mvmeta" has been defined for model frames, lies in the special handling of missing values in multivariate meta-analysis models fitted with mvmeta. Methods na.omit and na.exclude for class "data.frame.mvmeta" are useful for properly accounting for missing values when fitting these models.
Antonio Gasparrini, antonio.gasparrini@lshtm.ac.uk
See the default methods model.frame and model.matrix. See na.omit and na.exclude on the handling of missing values.
See mvmeta-package for an overview of the package and modelling framework.
| 1 2 3 4 5 6 7 8 9 10 11 | # RUN THE MODEL AND SUMMARIZE THE RESULTS
model <- mvmeta(cbind(PD,AL)~pubyear,S=berkey98[5:7],data=berkey98,method="ml")
# MODEL FRAME
model$model
model.frame(model)
update(model,method="model.frame")
class(model.frame(model))
# MODEL MATRIX
model.matrix(model)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.