R/Trend_estimate_CI_tests_rx2.R
Trend_estimate_CI_tests_rx2.Rd
Trend estimate for linear and logit models
The Wald test and CI
Likelihood ratio test
The Pearson goodness-of-fit test
Likelihood ratio (deviance) goodness-of-fit test
Described in Chapter 5 "The Ordered rx2 Table"
the observed counts (an rx2 matrix)
scores assigned to the rows
Link function for the binomial distribution see
?family
for more details
the nominal level, e.g. 0.05 for 95% CIs
An object of the contingencytables_result class,
basically a subclass of base::list()
. Use the utils::str()
function
to see the specific elements returned.
# Alcohol consumption and malformations (Mills and Graubard, 1987)
Trend_estimate_CI_tests_rx2(mills_graubard_1987, 1:5)
#> Wald test: P = 0.17600, T = 1.353
#> Likelihood ratio test: P = 0.18529, T = 1.755 (df = 1)
#> Pearson goodness-of-fit test: P = 0.12812, T = 5.682 (df = 3)
#> LR (deviance) test: P = 0.21704, T = 4.447 (df = 3)
#> Trend estimate and Wald CI: betahat = 0.2278 (95% CI -0.1022 to 0.5578)
# levated troponin T levels in stroke patients (Indredavik et al., 2008)
Trend_estimate_CI_tests_rx2(indredavik_2008, 1:5)
#> Wald test: P = 0.07549, T = -1.777
#> Likelihood ratio test: P = 0.07715, T = 3.124 (df = 1)
#> Pearson goodness-of-fit test: P = 0.00777, T = 11.889 (df = 3)
#> LR (deviance) test: P = 0.00930, T = 11.501 (df = 3)
#> Trend estimate and Wald CI: betahat = -0.1828 (95% CI -0.3844 to 0.0188)