getDesignOneRateExact {lrstat}R Documentation

Power and sample size for one-sample Poisson rate exact test

Description

Obtains the power given sample size or obtains the sample size given power for one-sample Poisson rate.

Usage

getDesignOneRateExact(
  beta = NA_real_,
  n = NA_real_,
  lambdaH0 = NA_real_,
  lambda = NA_real_,
  D = 1,
  alpha = 0.025
)

Arguments

beta

The type II error.

n

The total sample size.

lambdaH0

The Poisson rate under the null hypothesis.

lambda

The Poisson rate under the alternative hypothesis.

D

The average exposure per subject.

alpha

The one-sided significance level. Defaults to 0.025.

Value

A data frame containing the following variables:

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


# Example 1: power calculation
(design1 <- getDesignOneRateExact(
  n = 525, lambdaH0 = 0.049, lambda = 0.012,
  D = 0.5, alpha = 0.025))

# Example 2: sample size calculation
(design2 <- getDesignOneRateExact(
  beta = 0.2, lambdaH0 = 0.2, lambda = 0.3,
  D = 1, alpha = 0.05))


[Package lrstat version 0.2.5 Index]