Turn in problem # 1.
Anatomical data from domestic cats. SUMMARY: The heart and body weights of samples of male and female cats used for digitalis experiments. The cats were all adult, over 2 kg body weight. DATA DESCRIPTION: This data frame contains the following columns: Sex: Sex factor. Levels Female and Male. Bwt: Body weight in kg. Hwt: Heart weight in g. SOURCE: R. A. Fisher (1947) "The analysis of covariance method for the relation between a part and the whole", Biometrics, vol. 3, pp 65-68.
The files rawlings-ex4-8.St and rawlings-ex4-14.St have the commands you need for this problem. The following commands might also be useful:
library(MASS) attach( cats ) catsF <- cats[Sex=="F",-1] # makes a data frame of just females detach() catsF.lm <- lm( Hwt ~ Bwt, data=catsF ) catsF.oneway <- lm( Hwt ~ factor(Bwt), data=catsF ) attach( catsF ) tapply( Hwt, Bwt, mean )
Restricting attention to the FEMALE CATS ONLY,