metatest (version 1.0-5)

metatest: metatest fits and tests a metaregression model

Description

metatest fits and tests a metaregression model. In addition to the traditional z test on the estimated coefficients, metatest also yields more reliable statistics: the t-test, log likelihood ratio test, Bartlett corrected log likelihood ratio test, and the permutation test. The Bartlett corrected log likelihood ratio test and the permutation test are to be recommended since their type 1 errors are adequate.

Usage

metatest(formula, variance, data, threshold = 1e-05, maxiter = 100, npermut = 1000, ...)

# S3 method for metatest summary(object, digits = 4, ...) # S3 method for metatest print(x, ...)

Arguments

formula

formula specifying the meta regression model; use y~x to specify a meta regression of effect sizes y moderated by x; the moderators can be either continuous or categorical variables; an intercept is included by default (use y~x-1 to drop the intercept); use y~1 for an intercept only model, i.e. a meta-analysis model.

variance

The variances of the effect sizes to be modelled (a vector or a variable name interpreted in data).

data

A data.frame to interpet the variables in arguments formula and variance.

threshold

The threshold used in estimating the model; the threshold is the change in the value of the random effects variance parameter.

maxiter

Maximum number of iterations allowed in estimating the model.

npermut

Number of permutations performed by the permutation test.

object, x

Object of class metatest.

digits

Determines the number of digits to use in printing the results.

...

Not currently used.

Value

metatest returns an object of class metatest which is a named list with the following elements:

convergence

Convergence info; 0 indicates convergence; -1 signals that the estimator of between study variance was set to zero during estimation (with a warning).

iter

Number of iterations used in optimizing the parameters.

variance

Matrix with between study variance estimate, its associated log likelihood ratio statistic, df and p-value.

coefficients

Estimated coefficients.

se

Standard errors of the coefficients.

tval

The t-ratios of the coefficients.

pZtest

The p-values associated with the z-test.

dfttest

The df's associated with the t-tests.

pttest

The p-values associated with the t-test.

LLR

The log likelihood ratio statistics.

pLLR

The p-values associated with the LLR statistics.

bartLLR

The Bartlett corrected LLR statistics.

bartscale

The Bartlett scaling factor used to compute the corrected LLR statistics.

pBartlett

The p-values associated with the Bartlett corrected LLR statistics.

ppermtest

The p-values of the permutation tests.

call

The function call that created the metatest object.

Details

The effect sizes to be analyzed can be of arbitrary type; some transformations between different effect size measures are provided. For many more see the package compute.es.

The print and summary methods are currently identical (this may change in the future), and print the random effects variance, the coefficients, and all the computed statistics and associated p-values.

References

Hilde M. Huizenga, Ingmar Visser & Conor V. Dolan (2011). Hypothesis testing in random effects meta-regression, British Journal of Mathematical and Statistical Psychology, 64, 1-19.

Examples

Run this code
# NOT RUN {
data(metadata)
res <- metatest(y~x,yvar,data=metadata)
res
# }

Run the code above in your browser using DataCamp Workspace