designB: Design: Binomial responses

Description Usage Arguments Details Value Examples

View source: R/methods-for-data-generation.R

Description

Method for generating a sampling design for data generation following a binomial-Gaussian model.

Usage

1
  designB(n, h_bounds, a_bounds, s_bounds, r, x)

Arguments

n

resolution of the heterogeneity. n is the number of of different heterogeneity parameters in the design.

h_bounds

bounds of the heterogeneity.

a_bounds

bounds of the balancing factor of group assignments.

s_bounds

bounds of the study sizes.

r

fixed risk in the control.

x

design matrix.

Details

Generates a sampling design for the heterogeneity 'h', balancing factors 'a1', ..., 'ak' of group assignments, and study sizes 's1', ..., 'sk'. This design can be used for testing methods for inference for the random effects meta regression model since the logarithm of relative risks of each study is approximately Gaussian distributed. One may use methods that adjust for uncertainty in the heteroscedasticity estimates by additionally considering the size of the respected studies.

Points in the design are selected via a maxi-min hypercube sampling using the 'lhs' package in a predefined parameter cube.

Value

Function returns a data frame. Each line of this data frame can be an input to the function 'rB' which is used to sample data from such a design.

Examples

1
2
3
4
5
6
dB <- designB(n=15L, h_bounds=c(0,1), a_bounds=c(-.3,3),
  s_bounds=c(200L,2000L), r=0.03, x=cbind(1,1:5))

if(!all(dim(dB) == c(15,2*dim(cbind(1,1:5))[1]+2))) {
  stop("Wrong dimension")
}

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