Trend_estimate_CI_tests_rx2: Trend estimate for linear and logit models

View source: R/Trend_estimate_CI_tests_rx2.R

Trend_estimate_CI_tests_rx2R Documentation

Trend estimate for linear and logit models

Description

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"

Usage

Trend_estimate_CI_tests_rx2(
  n,
  a = seq_len(nrow(n)),
  linkfunction = "logit",
  alpha = 0.05
)

Arguments

n

the observed counts (an rx2 matrix)

a

scores assigned to the rows

linkfunction

Link function for the binomial distribution see ?family for more details

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

# Alcohol consumption and malformations (Mills and Graubard, 1987)
Trend_estimate_CI_tests_rx2(mills_graubard_1987, 1:5)

# levated troponin T levels in stroke patients (Indredavik et al., 2008)
Trend_estimate_CI_tests_rx2(indredavik_2008, 1:5)

ocbe-uio/contingencytables documentation built on Aug. 30, 2024, 7:16 a.m.