simScenProductTwoPrevs {bootComb}R Documentation

Simulation scenario for the product of two prevlaence estimates.

Description

This is a simulation to compute the coverage of the confidence interval returned by bootComb() in the case of the product of 2 probability parameter estimates.

Usage

simScenProductTwoPrevs(B = 1000, p1, p2, nExp1, nExp2, alpha = 0.05)

Arguments

B

The number of simulations to run. Defaults to 1e3.

p1

The true value of the first probability parameter.

p2

The true value of the second probability parameter.

nExp1

The size of each simulated experiment to estimate p1.

nExp2

TThe size of each simulated experiment to estimate p2.

alpha

The confidence level; i.e. the desired coverage is 1-alpha. Defaults to 0.05.

Value

A list with 2 elements:

estimate

A single number, the proportion of simulations for which the confidence interval contained the true parameter value.

conf.int

A 95% confidence interval for the coverage estimate.

Examples


simScenProductTwoPrevs(p1=0.35,p2=0.2,nExp1=100,nExp2=1000,B=100)
  # B value only for convenience here
  # Increase B to 1e3 or 1e4 (be aware this may run for some time).
 


[Package bootComb version 1.1.2 Index]