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 |
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.
Package: | metatest |
Type: | Package |
Version: | 1.0-2 |
Date: | 2011-10-04 |
License: | GPL |
LazyLoad: | yes |
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]>
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.
Small example data set used in the example on the metatest help page.
data(metadata)
data(metadata)
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.
Data were randomly generated following an example in Huizenga et al (2011) below.
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.
data(metadata) metadata
data(metadata) metadata
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.
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, ...)
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, ...)
formula |
|
variance |
The variances of the effect sizes to be modelled (a
vector or a variable name interpreted in |
data |
A |
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 |
digits |
Determines the number of digits to use in printing the results. |
... |
Not currently used. |
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.
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. |
Ingmar Visser & Hilde Huizenga. Maintainer: Ingmar Visser <[email protected]>
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.
data(metadata) res <- metatest(y~x,yvar,data=metadata) res
data(metadata) res <- metatest(y~x,yvar,data=metadata) res
Utility functions to transform various effect size measures into each other.
r2z(r) r2d(r) z2r(z) z2d(z)
r2z(r) r2d(r) z2r(z) z2d(z)
r |
A correlation coefficient. |
z |
A z-value, ie a normalized effect size. |
Transform effect sizes into correlations, (Cohen's) d effect sizes, or z-distributed for performing meta regression.
Return values are z, d or r values.
Ingmar Visser.
Tba
## The function r2z is currently defined as function(r) { return(0.5*(log(1+r)-log(1-r))) }
## The function r2z is currently defined as function(r) { return(0.5*(log(1+r)-log(1-r))) }