rm.oneway.test {MKinfer}R Documentation

Test for Equal Means in a Repeated Measures One-Way Layout

Description

Test whether two or more samples have the same locations in a repeated measures setting.

Usage

rm.oneway.test(x, g, id, method = "aov")

Arguments

x

numeric, response (outcome, dependent) variable.

g

factor, grouping (independent) variable.

id

factor, subject id (blocking variable).

method

name of method, possible methods are "aov", "lme", "friedman", "quade"

Details

The function wraps the functions aov, lme, friedman.test and quade.test into one function for a repeated measures one-way layout.

Value

A list with class "htest" containing the following components:

statistic

the value of the test statistic.

parameter

the degrees of freedom of the exact or approximate F distribution of the test statistic.

p.value

the p-value of the test.

method

a character string indicating the test performed.

data.name

a character string giving the names of the data.

References

Chambers, J. M., Freeny, A and Heiberger, R. M. (1992), Analysis of variance; designed experiments. Chapter 5 of Statistical Models in S, eds J. M. Chambers and T. J. Hastie, Wadsworth and Brooks/Cole.

Pinheiro, J.C., and Bates, D.M. (2000), Mixed-Effects Models in S and S-PLUS, Springer.

Myles Hollander and Douglas A. Wolfe (1973), Nonparametric Statistical Methods. New York: John Wiley and Sons. Pages 139-146.

D. Quade (1979), Using weighted rankings in the analysis of complete blocks with additive block effects. Journal of the American Statistical Association 74, 680-683.

William J. Conover (1999), Practical nonparametric statistics. New York: John Wiley and Sons. Pages 373-380.

See Also

aov, lme, friedman.test, quade.test

Examples

set.seed(123)
outcome <- c(rnorm(10), rnorm(10, mean = 1.5), rnorm(10, mean = 1))
timepoints <- factor(rep(1:3, each = 10))
patients <- factor(rep(1:10, times = 3))
rm.oneway.test(outcome, timepoints, patients)
rm.oneway.test(outcome, timepoints, patients, method = "lme")
rm.oneway.test(outcome, timepoints, patients, method = "friedman")
rm.oneway.test(outcome, timepoints, patients, method = "quade")

[Package MKinfer version 1.2 Index]