cSS: Sum of Square with a Given Contrast Set

View source: R/cSS.R

cSSR Documentation

Sum of Square with a Given Contrast Set

Description

Calculates sum of squares of a contrast from a lfit result.

Usage

  cSS(K, rx, mu=0, eps=1e-8)

Arguments

K

contrast matrix. Each row is a contrast.

rx

a result of lfit function

mu

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

eps

Less than this value is considered as zero.

Details

It calculates sum of squares with given a contrast matrix and a lfit result. It corresponds to SAS PROC GLM CONTRAST. This can test the hypothesis 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

CONTR

Examples

  rx = REG(uptake ~ Type, CO2, summarize=FALSE)
  cSS(t(c(0, -1, 1)), rx) # sum of square 
  GLM(uptake ~ Type, CO2) # compare with the above

sasLM documentation built on Oct. 2, 2024, 9:06 a.m.