n1.get.vector: Find minimal n1 achieving target power for all values of n0

View source: R/functions.r

n1.get.vectorR Documentation

Find minimal n1 achieving target power for all values of n0

Description

For values of n0 covered in the matrix data (typically from 20 to 500) the function calls n1.get and finds the minimal value of n1 achieving the target power.

Usage

n1.get.vector(data, beta, p0, delta, alpha, type = 1)

Arguments

data

power database for selected value of alpha and delta (See details)

beta

scalar target for power

p0

scalar value of baseline probability

delta

value of clinically relevant difference

alpha

value of nominal size of test

type

type of minimum solution (See details)

Details

This function is called by n1.get.solution and will likely never be run by the user.

The data matrix will be one of the 85 main databases.

If type=1, the smallest value N1 of n1 so that power > beta is returned. If type=2, the smallest value N1 of n1 so that power > beta for all n1>=N1 is returned.

Value

a list with element x (giving range of values of n0) and y (giving minimal solutions for n1 of power > beta). integer indicates

Author(s)

Chris J. Lloyd

References

C.J. Lloyd (2022) Exact samples sizes for clinical trials subject to size and power constraints. Preprint. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.13140/RG.2.2.11828.94085")}


exact.n documentation built on Nov. 9, 2023, 9:06 a.m.