// //Average test command // //This command is used to test average of sample by T test statistic. // //Syntax widthout option. test mean [variables]; //Syntax by option. test mean [variables]/ option ; //Option mother=yy //yy is average of population plevel=.xx //0.0 < .xx < 1.0 .xx is level of significance. (default=0.01) side=1 or 2 //1 is single side test and 2 is both sides test. //Example 1 is defference by average test with two group get iris@; //separate group by setosa or other. if(Species == "setosa") { outrec iris1; } else { outrec iris2; } //rename SepalL to merge. get iris1; no=#; rename SepalL=SepalL1; select no SepalL1; put iris1; get iris2; no=#; select no SepalL; //merge two group merge iris1 by no; //execute average test within two group. test mean SepalL SepalL1; //Example 2 //average test by average of population. hand hight/ 171.6 173.6 167.6 169.1 183.0 173.7 168.3 169.9 182.3 166.0 172.8 184.1 158.9 168.1 168.5 175.3 179.6 170.7 173.1 173.6 169.1 167.9 177.8 171.8 178.1 ; //execute average test test mean hight/ mother=163.7 ;