Learn R Programming

ordinalTables (version 1.0.0.3)

Agresti_w_diff: Computes the weighted statistics listed in section 2.3.

Description

Computes weighted contrast of the two margins. Agresti, A. (1983). Testing marginal homogeneity for ordinal categorical variables. Biometrics, 39(2), 505-510.

Usage

Agresti_w_diff(w, n)

Value

a list containing diff: the weighted contrast computed using weights w sigma_diff: SE(diff) z_diff: z-score for diff

Arguments

w

a vector of weights to be treated as scores

n

matrix of observed counts

Examples

Run this code
weights = c(-3.0, -1.0, 1.0, 3.0)
Agresti_w_diff(weights, vision_data)

Run the code above in your browser using DataLab