rma.exact: Compute a confidence region for grand mean.

Description Usage Arguments Value See Also Examples

Description

Compute a confidence region for grand mean.

Usage

1
2
3
4
rma.exact(yi, vi, c0 = 1, mu.bounds = NULL, tau2.bounds = NULL,
  resolution = 100, Z = NULL, B = 3000, resolution.mu = resolution,
  resolution.tau2 = resolution, mu.alpha = 0.995, tau2.alpha = 0.995,
  test.stat = NULL, ...)

Arguments

yi

a vector containing the primary study measurements

vi

a vector of the same length as yi containing the variances of the of the primary study measurements contained in yi

c0

a vector containing the mixing parameters for the test statistics; defaults to 1

mu.bounds

upper and lower bounds for the range of population effect values for constructing the confidence region; if NULL, value will be calculated from mu.alpha

tau2.bounds

upper and lower bounds for the range of population variance values for constructing the confidence region; if NULL, value will be calculated from tau2.alpha

resolution

resolution of the population mean and variance values within the bounding box; defaults to 1e2 for each of the two dimensions

Z

a matrix of length(yi) rows with each row consisting of standard normal samples to be used in the monte carlo estimation of the null distribution of the test statistic; if NULL, B values will be sampled per row

B

the number of monte carlo replicates per primary study observation to be used; defaults to 300

resolution.mu

resolution of the population mean values within the bounding box; defaults to resolution

mu.alpha

the level of the exact CI for constructing the bounds on the population mean dimension of the bounding box

tau2.alpha

the level of the exact CI for constructing the bounds on the population variance dimension of the bounding box

test.stat

(currently for internal use)

...

(currently for internal use)

level

the level of the confidence interval; defaults to .05

resolution

resolution of the population variance values within the bounding box; defaults to resolution

Value

an object of class RMA.Exact

See Also

rma.exact.fast for computing confidence intervals at specified levels, plot.RMA.Exact, confint.RMA.Exact

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
27
28
29
30
31
set.seed(1)

K <- 5
c0 <- 1
tau2 <- 12.5
vi <- (seq(1, 5, length=K))^2
yi=rnorm(K)*sqrt(vi+tau2)+mu0
rma0 <- rma.exact(yi=yi,vi=vi)
plot(rma0)
confint(rma0)

## multiple c0 values
c0 <- c(0,.25,1)
tau2 <- 12.5
vi <- (seq(1, 5, length=K))^2
yi=rnorm(K)*sqrt(vi+tau2)+mu0
rma0 <- rma.exact(yi=yi,vi=vi,c0=c0)
plot(rma0)
confint(rma0)

## setting tau2.bounds and other parameters to non-default values
Z <- matrix(rnorm(K*5e3),nrow=K)
B <- ncol(Z)
resolution <- 3e2
rma0 <- rma.exact(yi=yi,vi=vi,Z=Z,resolution=resolution,c0=c0,tau2.bounds=c(1,120),resolution.tau2=1e3,resolution.mu=1e2)
plot(rma0)

c0 <- 1:4
rma0 <- rma.exact(yi=yi,vi=vi,Z=Z,resolution=resolution,c0=c0,tau2.bounds=c(1,450),resolution.tau2=1e3,resolution.mu=1e2)
plot(rma0)
confint(rma0,levels=c(.05))

haben-michael/rma-exact-pkg documentation built on May 9, 2019, 9:58 p.m.