trend_test: Trend test for ordered r x 2 contingency table

Description Usage Arguments Details Value References

Description

Computes trend test based on the generalized linear model with logit link function (logistic regression) and the Wald test statistic.

Usage

1
trend_test(data, x, y, alpha = 0.05)

Arguments

data

tbl. Input data

x

character. Name of a categorical variable with r levels

y

character. Name of a categorical variable with 2 levels

alpha

double. The nominal level, Default: 0.05

Details

Procedure as described in Fagerland, Lydersen, & Laake (2017).

The function is an adaptation of the Matlab script provided by Fagerland et al. (2017) on the book's website.

Value

tbl. Data frame with Wald test statistic and p-value as well as estimate for the trend (odds ratio) and associated Wald confidence intervals

References

Fagerland, M., Lydersen, S., & Laake, P. (2017). Statistical analysis of contingency tables. London: Chapman and Hall.


idea-labs/comsldpsy documentation built on April 14, 2020, 4:28 p.m.