Description Usage Arguments Value Examples
Runs all implemented methods and combines them in a neat summary.
1 2 3 |
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 |
The same return type as the skeleton 'metagenEmpty()'.
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.