#Biostatistics 170 #READING DATA IN R FORMAT: ZAR=read.table("ZarEX8.7R.txt") ZAR attach(ZAR) X1=data[type=="typ1"] X1 X2=data[type=="typ2"] X2 #PERFORMING F TEST FOR EQUAL VARIANCES ?var.test #TWO-SIDED CASE: var.test(X1,X2,alternative="two.sided",conf.level=0.95) #NOTE ALTERNATIVE COMMAND IN R #FOR THE SAME TEST: var.test(data~type,alternative="two.sided",conf.level=0.95) #ONE-SIDED CASE LOWER TAIL: var.test(data~type,alternative="less",conf.level=0.95) #ONE-SIDED CASE UPPER TAIL: var.test(data~type,alternative="greater",conf.level=0.95) #PERFORMING LEVENE TEST FOR EQUAL VARIANCES #DOWNLOAD {car} FROM CRAN WEBSITE library(car) ?leveneTest leveneTest(data,type,center=mean) leveneTest(data,type,center=median)