Do F test with a given set of contrasts.
CONTR(L, Formula, Data, mu=0)
contrast matrix. Each row is a contrast.
a conventional formula for a linear model
a data.frame
to be analyzed
a vector of mu for the hypothesis L. The length should be equal to the row count of L.
Returns sum of square and its F value and p-value.
degree of freedom
sum of square for the set of contrasts
mean square
F value for the F distribution
proability of larger than F value
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.
# 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