Package 'metatest'

Title: Fit and Test Metaregression Models
Description: Fits and tests meta regression models and generates a number of useful test statistics: next to t- and z-tests, the likelihood ratio, bartlett corrected likelihood ratio and permutation tests are performed on the model coefficients.
Authors: Hilde M. Huizenga & Ingmar Visser
Maintainer: Ingmar Visser <[email protected]>
License: GPL
Version: 1.0-5
Built: 2025-01-30 04:36:32 UTC
Source: https://github.com/cran/metatest

Help Index


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.

See metatest for details and an example.

Details

Package: metatest
Type: Package
Version: 1.0-2
Date: 2011-10-04
License: GPL
LazyLoad: yes

Author(s)

The code that does the hard work was written by Hilde Huizenga. Ingmar Visser added the interface functions and handled turning code into a package. Maintainer: Ingmar Visser <[email protected]>

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.


Example data for meta regression testing.

Description

Small example data set used in the example on the metatest help page.

Usage

data(metadata)

Format

A data frame with 6 observations on the following 3 variables.

y

The effect sizes.

yvar

The variances of the effect sizes.

x

A moderator variable.

Source

Data were randomly generated following an example in Huizenga et al (2011) below.

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

data(metadata)
metadata

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 class 'metatest'
summary(object, digits = 4, ...)
## S3 method for class '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.

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.

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.

Author(s)

Ingmar Visser & Hilde Huizenga. Maintainer: Ingmar Visser <[email protected]>

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

data(metadata)
res <- metatest(y~x,yvar,data=metadata)
res

Transform effect sizes.

Description

Utility functions to transform various effect size measures into each other.

Usage

r2z(r)
r2d(r)
z2r(z)
z2d(z)

Arguments

r

A correlation coefficient.

z

A z-value, ie a normalized effect size.

Details

Transform effect sizes into correlations, (Cohen's) d effect sizes, or z-distributed for performing meta regression.

Value

Return values are z, d or r values.

Author(s)

Ingmar Visser.

References

Tba

Examples

## The function r2z is currently defined as
function(r) {
	return(0.5*(log(1+r)-log(1-r)))
  }