The Cochran-Armitage confidence interval for trend in the linear model

Described in Chapter 5 "The Ordered rx2 Table"

CochranArmitage_CI_rx2(n, a = seq_len(nrow(n)), alpha = 0.05)

Arguments

n

the observed counts (an rx2 matrix)

a

scores assigned to the rows

alpha

the nominal level, e.g. 0.05 for 95% CIs

Value

An object of the contingencytables_result class, basically a subclass of base::list(). Use the utils::str() function to see the specific elements returned.

Examples

CochranArmitage_CI_rx2(mills_graubard_1987, c(1, 2, 3, 4, 5))
#> Trend estimate and Cochran-Armitage CI:  betahat = 0.0007 (95% CI -0.0006 to 0.0020)
CochranArmitage_CI_rx2(indredavik_2008, c(1, 2, 3, 4, 5))
#> Trend estimate and Cochran-Armitage CI:  betahat = -0.0194 (95% CI -0.0395 to 0.0007)