对于这个项目,我需要使用R脚本来模拟t检验的有效性.我必须使用for循环将用于执行以下2000次:
循环看起来像这样
i <- 1 for (i <= 2001) { x <-rf(5,df1=5,df2=10) b <- df2 p.value <-t.test(x,mu=(b/(b-2))$p.value i <- i+1 }
statistics loops r
loops ×1
r ×1
statistics ×1