n1.get.solution | R Documentation |
This function calls n1.get.vector, runs if for all values of p0 within the supplied range and then takes the worst (i.e. largest) solution for n1
n1.get.solution(data, beta, p0, delta, alpha, type = 1)
data |
power database for selected value of alpha and delta |
beta |
scalar target for power |
p0 |
single value or range of values for baseline probability |
delta |
value of clinically relevant difference |
alpha |
value of nominal size of test |
type |
type of minimum solution (See details) |
vector of solutions for n1 with name vector equal to range of n0 values
Chris J. Lloyd
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")}
# Load toy version of power library for alpha=0.025, delta=0.20.
rdata_file = system.file('files', 'LIB.a025.d20.Rdata', package = 'exact.n')
load(rdata_file)
# n0 solutions when p0=0.5
n1.get.solution(LIB.a025.d20,beta=.7,p0=0.5,delta=0.2,alpha=0.025,type=1)
# n0 solutions for p0 between 0.4 ad 0.5
n1.get.solution(LIB.a025.d20,beta=.7,p0=c(0.4,0.5),delta=0.2,alpha=0.025,type=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.