#Biostatistics 120 #t.test IN R #TO FIND INFORMATION ON t.test() ?t.test #ZAR EXAMPLE 7.2 ZAR=read.table("ZarEX7.2.txt") ZAR attach(ZAR) X=RATwtchg t.test(X,alternative="two.sided", mu=0,conf.level=0.95) #ZAR EXAMPLE 7.1 ZAR=read.table("ZarEX7.1.txt") ZAR attach(ZAR) X=crabtemp t.test(X,alternative="two.sided", mu=24.3,conf.level=0.95) #ZAR EXAMPLE 7.3 ZAR=read.table("ZarEX7.3.txt") ZAR attach(ZAR) X=wtchg t.test(X,alternative="less", mu=0,conf.level=0.95) #NOTE: R REPORTS A ONE-WAY CI #ZAR EXAMPLE 7.4 ZAR=read.table("ZarEX7.4.txt") ZAR attach(ZAR) X=distime t.test(X,alternative="greater", mu=45,conf.level=0.95) #NOTE: R REPORTS A ONE-WAY CI