metareg: Inference: Based on methods of moments and maximum...

Description Usage Arguments Value Examples

View source: R/methods-for-inference.R

Description

Calculates common statistics for point and confidence interval estimates for the heterogeneity and the regression coefficients of the random effects meta regression model based on the given data.

Usage

1
  metareg(y, d, x, sgnf)

Arguments

y

k-vector of study responses.

d

k-vector of heteroscedasticity.

x

design k-p-matrix.

sgnf

significance levels.

Value

The same return type as the skeleton 'metagenEmpty()'.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
bcg   <- bcgVaccineData()
bcg_y <- bcg$logrisk
bcg_d <- bcg$sdiv
bcg_s <- bcg$size
bcg_x <- cbind(1,bcg$x)
sgnf_lev <- c(0.01, 0.025, 0.05, 0.01)

set.seed(865287113) # for reproducibility

c1 <- metareg(y=bcg_y, d=bcg_d, x=bcg_x, sgnf=0.025)
c2 <- metareg(y=bcg_y, d=bcg_d, x=bcg_x, sgnf=sgnf_lev)

# When performing a meta analysis, provide the function
# with a vector of 1s.
if (!all(names(c1) == names(metagenEmpty()))) stop("Name clash")
if (!all(names(c2) == names(metagenEmpty()))) stop("Name clash")

metagen documentation built on May 29, 2017, 7:13 p.m.