CONTR: F Test with a Set of Contrasts

View source: R/CONTR.R

CONTRR Documentation

F Test with a Set of Contrasts

Description

Do F test with a given set of contrasts.

Usage

  CONTR(L, Formula, Data, mu=0)

Arguments

L

contrast matrix. Each row is a contrast.

Formula

a conventional formula for a linear model

Data

a data.frame to be analyzed

mu

a vector of mu for the hypothesis L. The length should be equal to the row count of L.

Details

It performs F test with a given set of contrasts (a matrix). It is similar to the CONTRAST clause of SAS PROC GLM. This can test the hypotheis that the linear combination (function)'s mean vector is mu.

Value

Returns sum of square and its F value and p-value.

Df

degree of freedom

Sum Sq

sum of square for the set of contrasts

Mean Sq

mean square

F value

F value for the F distribution

Pr(>F)

proability of larger than F value

Author(s)

Kyun-Seop Bae k@acr.kr

See Also

cSS

Examples

  CONTR(t(c(0, -1, 1)), uptake ~ Type, CO2) # sum of square 
  GLM(uptake ~ Type, CO2) # compare with the above

sasLM documentation built on Sept. 5, 2022, 5:11 p.m.