aron (05/04/83)
echo x - anova cat >anova <<'!Funky!Stuff!' .BG .FN anova .TL anova: two-way analysis of variance (simple) .CS anova(mat, print) .PP .AG mat matrix of values .AG print flag, if TRUE (the default) the anova results are printed. See function avprt. .RT Five different statistics are returned as vectors (described below) for between row, between column, residuals (error) and total. .RC ssq This is the Sum of Squares vector. .RC df This is the Degrees of Freedom vector. .RC msq This is the Mean Square vector. .RC f This is the F statistic vector. .RC pf This is the probability of F statistic vector.. .EX av_anova(mt1) .KW anova .WR !Funky!Stuff! echo x - avprt cat >avprt <<'!Funky!Stuff!' .BG .FN avprt .TL avprt: print anova results .CS avprt(z) .PP .AG z z is a structure returned from anova. .RT Avprt returns the same structure as the function anova. .EX z_avprt(z) .KW avprt .WR !Funky!Stuff! echo x - bfprt cat >bfprt <<'!Funky!Stuff!' .BG .FN bfprt .TL bfprt: prints results of bonferroni function .CS bfprt(z) .PP .AG z z is a structure returned from bonferroni. .RT bfprt returns the same structure as the function bonferroni. .EX bf_bfprt(bf) .KW bfprt .WR !Funky!Stuff! echo x - bonferroni cat >bonferroni <<'!Funky!Stuff!' .BG .FN bonferroni .TL bonferroni: computes Bonferroni's statistic on pairs of columns .CS bonferroni(mat, mse, print) .PP .AG mat matrix of values, where variables are columns, rows are observations. .AG mse error of Mean Square from ANOVA done on mat. .AG print flag, if TRUE (the default) the bonferroni results are printed. See function bfprt. .RT The function returns various statistics on column comparisons in matrix form. The value in row i column j in a returned matrix is the result of a computation on the vector created by comparing column i to column j in the original mat matrix. The matrices are combined in one returned structure. .RC mdiff Matrix of differences between column means. .RC mt Matrix of t statistic on compared columns (Bonferroni's statistic). .RC mpt Matrix of t statistic probabilities on compared columns. .EX av_anova(mt1) bf_bonferroni(mt1,av$msq[3]) .KW bonferroni .WR !Funky!Stuff! echo x - eedit cat >eedit <<'!Funky!Stuff!' .BG .FN eedit .FN again .TL eedit: Edit Dumped Expressions or Character Vectors .CS eedit() #for editing the dumped expression again() #to re-evaluate dumped expression eedit(x) #for character vector .PP .AG x optional character vector to be edited. If `x' is omitted, `eedit' operates on the last expression dumped because of a syntax or an execution error. .SH EFFECT If `x' is given, the edited data is assigned, with the same name, on the working database. Note that this implies that it is impossible to edit an expression (as opposed to a dataset), since this has no name for the assignment: `eedit(encode(1:5))' will not work. .PP After `eedit' is invoked, the data from the dumped expression or character vector is written to a hidden file, one element of the vector per line of the file. The `emacs' text editor is invoked and the file is read. .PP At this point, `emacs' commands can be used to modify the text. When a suitable version of the text is produced, execute the following two `emacs' commands: `write-current-file' to write the edited text back to the file, and `exit-emacs' to exit from `emacs'. .PP After exiting from `emacs', the file is read by `eedit'. If the data was a dumped expression, a hidden call to `source' causes the edited expression to be executed. Notice that this edited version stays around, for another call to `eedit' to make further changes. If `x' was given, the edited expression is stored on the working database. .PP To suppress execution of the edited expression do **not** just quit without writing (this leaves the expression as before). Instead, use the `emacs' command `erase-buffer', then `exit-emacs'; this leaves nothing to execute. .PP The function `again' is useful to re-execute expressions that were dumped because of execution errors that have been remedied, e.g., when a graphic device has been activated, when a missing dataset has been created, or when a prefix has been specified. .PP Use the function `emedit' to edit macros. .EX eedit(state.name) #edit the vector of state names. .KW basic* .KW editing .WR !Funky!Stuff! echo x - emedit cat >emedit <<'!Funky!Stuff!' .BG .FN emedit .TL emedit: Edit Macros .CS emedit(defin, pos) .PP .AG defin the macro to be edited. Note that macros are datasets with names beginning "mac.". .AG pos optional, database position on which edited macro is to be saved; default 2. .PP `emedit' invokes the `emacs' text editor on a copy of the macro text. Use `emacs' to make whatever changes are desired in the macro. Then use the `write-current-file' command in `emacs' to write the macro, followed by `exit-emacs' to exit from `emacs'. The macro will automatically be re-processed through the `define' function, and stored on the specified database. .EX emedit(mac.abc) # edits macro `abc' and replaces it .KW macros .KW editing .WR !Funky!Stuff! echo x - pairedt cat >pairedt <<'!Funky!Stuff!' .BG .FN pairedt .TL pairedt: Computes various statistics on pairs of columns .CS pairedt(mat, print) .PP .AG mat matrix of values, where variables are columns, rows are observations. .AG print flag, if TRUE (the default) the pairedt results are printed. See function ptprt. .RT The function returns various statistics on column differences in matrix form. The value in row i column j in a returned matrix is the result of a computation on the vector created by subtracting column j from column i in the original mat matrix. The matrices are combined in one returned structure. .RC mmean Matrix of means of column differences. .RC mvar Matrix of variances of column differences. .RC mt Matrix of t statistic of column differences. .RC mdf Matrix of degrees of freedom of column differences. .RC mpt Matrix of p value for t statistic of column differences. .EX z_pairedt(m1) .KW pairedt .WR !Funky!Stuff! echo x - ptprt cat >ptprt <<'!Funky!Stuff!' .BG .FN ptprt .TL ptprt: prints results of pairedt function .CS ptprt(z) .PP .AG z z is a structure returned from pairedt. .RT Ptprt returns the same structure as the function pairedt. .EX z_ptprt(z) .KW ptprt .WR !Funky!Stuff! echo x - tkprt cat >tkprt <<'!Funky!Stuff!' .BG .FN tkprt .TL tkprt: prints results of tukey function .CS tkprt(z) .PP .AG z z is a structure returned from tukey. .RT Tkprt returns the same structure as the function tukey. .EX tk_tkprt(tk) .KW tkprt .WR !Funky!Stuff! echo x - tukey cat >tukey <<'!Funky!Stuff!' .BG .FN tukey .TL tukey: computes Tukey's statistic on pairs of columns .CS tukey(mat, mse, print) .PP .AG mat matrix of values, where variables are columns, rows are observations. .AG mse error of Mean Square from ANOVA done on mat. .AG print flag, if TRUE (the default) the tukey results are printed. See function tkprt. .RT The function returns various statistics on column comparisons in matrix form. The value in row i column j in a returned matrix is the result of a computation on the vector created by comparing column i to column j in the original mat matrix. The matrices are combined in one returned structure. .RC mdiff Matrix of differences between column means. .RC mq Matrix of q statistic on compared columns (Tukey's statistic). .EX av_anova(mt1) tk_tukey(mt1,av$msq[3]) .KW tukey .WR !Funky!Stuff! echo x - vedit cat >vedit <<'!Funky!Stuff!' .BG .FN vedit .FN again .TL vedit: Edit Dumped Expressions or Character Vectors .CS vedit() #for editing the dumped expression again() #to re-evaluate dumped expression vedit(x) #for character vector .PP .AG x optional character vector to be edited. If `x' is omitted, `vedit' operates on the last expression dumped because of a syntax or an execution error. .SH EFFECT If `x' is given, the edited data is assigned, with the same name, on the working database. Note that this implies that it is impossible to edit an expression (as opposed to a dataset), since this has no name for the assignment: `vedit(encode(1:5))' will not work. .PP After `vedit' is invoked, the data from the dumped expression or character vector is written to a hidden file, one element of the vector per line of the file. The `vi' text editor is invoked and the file is read. .PP At this point, `vi' commands can be used to modify the text. When a suitable version of the text is produced, execute the following two `vi' commands: `w' to write the edited text back to the file, and `q' to exit from `vi'. .PP After exiting from `vi', the file is read by `vedit'. If the data was a dumped expression, a hidden call to `source' causes the edited expression to be executed. Notice that this edited version stays around, for another call to `vedit' to make further changes. If `x' was given, the edited expression is stored on the working database. .PP To suppress execution of the edited expression do **not** just quit without writing (this leaves the expression as before). Instead, use the `vi' command `1,$s/.*//', then `w'; this leaves nothing to execute. .PP The function `again' is useful to re-execute expressions that were dumped because of execution errors that have been remedied, e.g., when a graphic device has been activated, when a missing dataset has been created, or when a prefix has been specified. .PP Use the function `vmedit' to edit macros. .EX vedit(state.name) #edit the vector of state names. .KW basic* .KW editing .WR !Funky!Stuff! echo x - vmedit cat >vmedit <<'!Funky!Stuff!' .BG .FN vmedit .TL vmedit: Edit Macros .CS vmedit(defin, pos) .PP .AG defin the macro to be edited. Note that macros are datasets with names beginning "mac.". .AG pos optional, database position on which edited macro is to be saved; default 2. .PP `vmedit' invokes the `vi' text editor on a copy of the macro text. Use `vi' to make whatever changes are desired in the macro. Then use the `w' command in `vi' to write the macro, followed by `q' to exit from `vi'. The macro will automatically be re-processed through the `define' function, and stored on the specified database. .EX vmedit(mac.abc) # edits macro `abc' and replaces it .KW macros .KW editing .WR !Funky!Stuff! echo x - fun.tab cat >fun.tab <<'!Funky!Stuff!' anova anova avprt avprt bfprt bfprt bonferroni bonferroni eedit eedit emedit emedit pairedt pairedt ptprt ptprt tkprt tkprt tukey tukey vedit vedit vmedit vmedit !Funky!Stuff!