sample-size

Sample size and power calculation in r as viable alternative to proc power in SAS?

痞子三分冷 提交于 2019-12-22 05:16:20
问题 So I am trying to see how close the sample size calculations (for two sample independent proportions with unequal samples sizes) are between proc power in SAS and some sample size functions in r. I am using the data found here at a UCLA website. The UCLA site gives parameters as follows: p1=.3,p2=.15,power=.8,null difference=0, and for the two-sided tests it assumes equal sample sizes; for the unequal sample size tests the parameters are the same, with group weights of 1 for group1 and 2 for

How to calculate (statistical) power function vs. sample size in python?

不羁岁月 提交于 2019-12-21 06:12:49
问题 How can this be done in python? Calculate sample size for a given power and alpha? Calculate power for a given sample size and alpha? Note: I am totally confused :( with the functions that python gives for (statistical) power function calculation. Can someone help me to make an order here? There are two functions under statsmodels: from statsmodels.stats.power import ttest_power, tt_ind_solve_power() We have: tt_ind_solve_power(effect_size=effect_size, alpha=alpha, power=0.8, ratio=1,

Sample size and power calculation in r as viable alternative to proc power in SAS?

≡放荡痞女 提交于 2019-12-05 07:48:05
So I am trying to see how close the sample size calculations (for two sample independent proportions with unequal samples sizes) are between proc power in SAS and some sample size functions in r. I am using the data found here at a UCLA website. The UCLA site gives parameters as follows: p1=.3,p2=.15,power=.8,null difference=0, and for the two-sided tests it assumes equal sample sizes; for the unequal sample size tests the parameters are the same, with group weights of 1 for group1 and 2 for group2, and the tests they perform are one-sided. I am using the r function pwr.t.test(n=NULL,d=0,sig

How to calculate (statistical) power function vs. sample size in python?

十年热恋 提交于 2019-12-03 20:27:00
How can this be done in python? Calculate sample size for a given power and alpha? Calculate power for a given sample size and alpha? Note: I am totally confused :( with the functions that python gives for (statistical) power function calculation. Can someone help me to make an order here? There are two functions under statsmodels: from statsmodels.stats.power import ttest_power, tt_ind_solve_power() We have: tt_ind_solve_power(effect_size=effect_size, alpha=alpha, power=0.8, ratio=1, alternative='two-sided') And we have also: ttest_power(0.2, nobs=sampleSize, alpha=alpha, alternative='two