文件名称:sample_size_calculation_and_power_analysis_in_R:R中的样本大小计算和功效分析
文件大小:1KB
文件格式:ZIP
更新时间:2024-03-03 23:15:31
R中的样本量计算和功效分析 library(pwr) effect_size<-1.1 power.t.test(delta=effect_size,sd=1,sig.level=0.05,power=.80,alternative="two.sided") ## equivalent to uniroot(function(n)pt(qt(0.025,df=(n-1)*2,lower.tail=F),df=(n-1)*2,ncp=sqrt(n/2)*effect_size,lower.tail=F)-0.8,c(3,20))$root 线性回归 # Eg: GPA_college ~ SAT + GPA_high_school # SAT + GPA_high_school explains 50% of variance # Test: SAT and GPA_high_school
【文件预览】:
sample_size_calculation_and_power_analysis_in_R-master
----README.md(2KB)