Learn R Programming

easyanova (version 11.0)

ec: Easy contrast

Description

Performs contrasts of means

Usage

ec(mg1, mg2, sdg1, sdg2, df)

Value

Returns t test for contrast

Arguments

mg1

Means of the group 1

mg2

Means of the group 2

sdg1

Standard error of the group 1

sdg2

Standard error of the group 2

df

Degree of freedom from error

Author

Emmanuel Arnhold <emmanuelarnhold@yahoo.com.br>

References

KAPS, M. and LAMBERSON, W. R. Biostatistics for Animal Science: an introductory text. 2nd Edition. CABI Publishing, Wallingford, Oxfordshire, UK, 2009. 504p.

See Also

ea1,ea2

Examples

Run this code
# Kaps and Lamberson(2009, pg 254)

data(data1)

r<-ea1(data1, design=1)
r[2]

# first contrast
mg1=312;mg2=c(278,280); sdg1=7.7028;sdg2=c(7.7028,7.7028); df=12
ec(mg1,mg2,sdg1,sdg2,df)

# second contrast
mg1=280;mg2=278; sdg1=7.7028;sdg2=7.7028; df=12
ec(mg1,mg2,sdg1,sdg2,df)

Run the code above in your browser using DataLab