Learn R Programming

sasLM (version 0.6.0)

CONTR: 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.

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

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.

See Also

cSS

Examples

Run this code
# NOT RUN {
  CONTR(t(c(0, -1, 1)), uptake ~ Type, CO2) # sum of square 
  ANOVA(uptake ~ Type, CO2) # compare with the above
# }

Run the code above in your browser using DataLab