ESTEP.rd: Calculate E-P-values based on LR statistic.

ESTEP.rdR Documentation

Calculate E-P-values based on LR statistic.

Description

Calculates all possible values of the E-P-value for testing p1-p0 greater than a provided null value psi.

Usage

ESTEP.rd(n0, n1, psi = 0, J = NULL, sided = 1, dec.places = 10, prin = FALSE)

Arguments

n0

control sample size

n1

treatment sample size

psi

null value of risk difference p1-p0

J

index of single data set if desired

sided

(1 or 2 sided test)

dec.places

number of decimal places of output t-values and p-values.

prin

outputs expected time and progress of calculation

Details

This function can take a long time for larger sample sizes. The computation time is of order (n0*n1)^2.

Value

A list with elements

y0,y1

data sets (scalar or vector)

oldP

approximate p-value(s) before E-step

T, P

quasi-exact P-value(s) and equivalent T-value(s)

pmle

profile ML estimates of baseline probability

index

consistent code to select a single outcome

psi

scalar null value of p1-p0

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.