Learn R Programming

rcompanion (version 1.0.1)

pairwiseOrdinalPairedTest: Pairwise two-sample ordinal regression for paired or blocked data

Description

Performs pairwise two-sample ordinal regression across groups for paired or blocked data.

Usage

pairwiseOrdinalPairedTest(x, g, b, method = "fdr", ...)

Arguments

x
The response variable as a vector.
g
The grouping variable as a vector.
b
The blocking variable as a vector.
method
The p-value adjustment method to use for multiple tests. See p.adjust.
...
Additional arguments passed to clmm.

Value

A dataframe of the groups being compared, the p-values, and the adjusted p-values.

Details

Ordinal regression is analogous to general linear regression or generalized linear regression for cases where the dependent variable is an ordinal variable. The ordinal package provides a flexible and powerful implementation of ordinal regression. The pairwiseOrdinalPairedTest function can be used as a post-hoc method following an omnibus ordinal regession whose form is analogous to a one-way analysis of variance with random blocks. The blocking variable is treated as a random variable. The x variable must be an ordered factor.

References

http://rcompanion.org/handbook/G_08.html

See Also

pairwiseOrdinalPairedMatrix

Examples

Run this code
data(BobBelcher)
BobBelcher$Likert.f = factor(BobBelcher$Likert, ordered = TRUE)
BobBelcher = BobBelcher[order(factor(BobBelcher$Instructor, 
                        levels=c("Linda Belcher", "Louise Belcher",
                                 "Tina Belcher", "Bob Belcher",
                                 "Gene Belcher"))),] 
pairwiseOrdinalPairedTest(x      = BobBelcher$Likert.f,
                          g      = BobBelcher$Instructor,
                          b      = BobBelcher$Rater,
                          threshold="equidistant",
                          method = "fdr")

Run the code above in your browser using DataLab