metagen: Inference: Analysis of the data set

Description Usage Arguments Value Examples

Description

Runs all implemented methods and combines them in a neat summary.

Usage

1
2
3
  metagen(y, d, x, sgnf, s = NULL, n,
    method = list("univariate", "multivariate"),
    adjusted = FALSE)

Arguments

y

k-vector of responses.

d

k-vector of heteroscedasticities.

x

design k-p-matrix.

sgnf

vector of significance levels.

s

k-vector of study responses. Default is NULL. If 'adjusted=TRUE', this value needs to be given.

n

draws from the pivotal distribution.

method

Default is 'list("univariate", "multivariate")'.

adjusted

: TRUE or FALSE

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
17
18
19
20
21
22
23
24
25
26
bcg   <- bcgVaccineData()
bcg_y <- bcg$logrisk
bcg_d <- bcg$sdiv
bcg_x <- cbind(1,bcg$x)
sgnf_lev <- c(0.01, 0.025, 0.05, 0.01)

set.seed(865287113) # for reproducibility

# Runs a standard analysis, use n=1000 in an actual
# analysis instead!
m1 <- metagen(y=bcg_y, d=bcg_d, x=bcg_x, sgnf=0.025, n=50)
m2 <- metagen(y=bcg_y, d=bcg_d, x=bcg_x, sgnf=sgnf_lev, n=50)

# Runs the methods based on generalised principles via an
# adjustment for the unknown heteroscedasticity.  Use
# n=1000 in an actual analysis instead!!
bcg_s <- bcg$size
m3 <- metagen(y=bcg_y, d=bcg_d, x=bcg_x, sgnf=0.025, s=bcg_s, n=50,
  adj=TRUE)
m4 <- metagen(y=bcg_y, d=bcg_d, x=bcg_x, sgnf=sgnf_lev, s=bcg_s,
  n=50, adj=TRUE)

if (!all(names(m1) == names(metagenEmpty()))) stop("Name clash")
if (!all(names(m2) == names(metagenEmpty()))) stop("Name clash")
if (!all(names(m3) == names(metagenEmpty()))) stop("Name clash")
if (!all(names(m4) == names(metagenEmpty()))) stop("Name clash")

Example output

Warning message:
replacing previous import 'BBmisc::isFALSE' by 'backports::isFALSE' when loading 'ParamHelpers' 

metagen documentation built on May 2, 2019, 6:08 a.m.

Related to metagen in metagen...