Learn R Programming

RVAideMemoire (version 0.9-35)

friedman.rating.test: Friedman rank sum test for ratings

Description

Wrapper for friedman.test with ratings (ordinal response variables).

Usage

friedman.rating.test(y, ...)

## S3 method for class 'default':
friedman.rating.test(y, groups, blocks, ...)

## S3 method for class 'formula':
friedman.rating.test(formula, data, subset, na.action, ...)

Arguments

y
response variable (preferably an ordered factor).
groups
a vector giving the group for the corresponding element of y.
blocks
a vector giving the block for the corresponding element of y.
formula
a formula of the form a ~ b | c, where a, b and c give the data values and corresponding groups and blocks, respectively. It is preferable that a is an ordered factor.
data
an optional data frame containing the variables in the formula formula. By default the variables are taken from environment(formula).
subset
an optional vector specifying a subset of observations to be used.
na.action
a function which indicates what should happen when the data contain NAs. Defaults to getOption("na.action").
...
further arguments to be passed to or from other methods.

Value

Examples

Run this code
set.seed(1608)
response <- factor(sample(1:6,30,replace=TRUE),levels=c("1","2","3","4","5","6"),ordered=TRUE)
fact <- gl(3,1,30,labels=LETTERS[1:3])
block <- gl(10,3,labels=letters[1:10])
friedman.rating.test(response~fact|block)

Run the code above in your browser using DataLab