在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
P-Value Central Lmit Theorem(CLT)
mean(null>diff) hist(null) qqnorm(null) qqline(null)
pops<-read.cssv("mice_pheno.csv") hed(pops) hf<- pops[popsSDiet=="hf"&popsSSex=="F",3] chow<-pops[popsSDiet=="chow"&popsSSex=="F",3] mean(hf)-mean(chow) x<- sample(hf,12) y<-sample(chow,12) mean(x)_mean(y)
Ns<-c(3,5,10,25) B<-10000 res<-sapply(Ns,funtion(n){sapply(1:8,function(j){mean(sample(hf,n))})}) lbrary(rafalib) mypar2(2,2) 未完 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sample variance sample standard deviations confidence intervals
t-statics: 开始编辑
dat control <- dat[1:12,2] treatment<-dat[12+1:12,2] diff <- mean(treatment)-mean(control) print(diff) t.test(treatment,control) sd(control) sd(control)/sqrt(length(control)) se <- sqrt(var(treatment)/length(treatment)+var(control)/length(control)) tstat <- diff/se 1-pnorm(tstat)+pnorm(-tstat) qqnorm(treatment) qqline(treatment) t.test(treatment,control)
|
请发表评论