> source("pulse.s") # read data and run analysis of variance > > pulse.fit # short printing Call: aov(formula = rate ~ task, data = pulse) Terms: task Residuals Sum of Squares 694.439 1916.076 Deg. of Freedom 5 62 Residual standard error: 5.559177 Estimated effects may be unbalanced > > names(pulse.fit) # names of components [1] "coefficients" "residuals" "fitted.values" "effects" [5] "R" "rank" "assign" "df.residual" [9] "contrasts" "terms" "call" > > summary(pulse.fit) # analysis of variance summary Df Sum of Sq Mean Sq F Value Pr(F) task 5 694.439 138.8877 4.494101 0.001470938 Residuals 62 1916.076 30.9045 > > anova(pulse.fit) # another way to print analysis of variance Analysis of Variance Table Response: rate Terms added sequentially (first to last) Df Sum of Sq Mean Sq F Value Pr(F) task 5 694.439 138.8877 4.494101 0.001470938 Residuals 62 1916.076 30.9045 > > library(pda) # attach Practical Data Analysis library > lsmean(pulse.fit) # least squares means with standard errors x pred se 1 1 31.92308 1.541838 2 2 31.08333 1.604796 3 3 35.80000 1.757966 4 4 38.00000 1.757966 5 5 29.50000 1.604796 6 6 28.81818 1.676155 > > printer() # dumb printer for crude plotting > # use x11() or X11() to see fancy plots > # use postscript() to save fancy plots > plot(pulse.fit) # creates 2 plots -- mean vs. observations... ...................................................................... . . O . . . 45.. O . . O O . O . . . . O O . 40.. O O . . O . . . O .... . .... . O O O .... . O.... . .... 35.. O O O ... r . .... a . O O O .... O O t . .... e . .... . .... . ..O O . .... . O ....O O O O 30.. O .... O O O . .... . O... O .. . O O O O O . . O . . O O O . 25.. O O . . O . . . . . O O . 20.. O . ...................................................................... 30 32 34 36 38 Fitted: task > show() # second plot is mean vs. absolute deviation ...................................................................... . . O . . . . . . 10.. O . . O . . O O . . O . O a 8.. O b . O s . ( . r . O O e . O s . i . d . O ( 6.. O O O p . O u . O l . s . O O O O e . O O . . f . O i . t 4.. O O O ) . O O ) . O . . O . O . . . O O 2.. O O O . . O . . O O . O . O . O O 0.. O O . ...................................................................... 30 32 34 36 38 Fitted: task >