Determine required sample size for a paired t-test using power analysis
18 次查看(过去 30 天)
显示 更早的评论
I have two sets of measurements that I'm comparing with each other; x1, x2. The data are paired such that x1(n) corresponds to x2(n) (similar to a before and after scenario, for example x1 might be a group of people's weight before a diet, x2 is their weight after 3 weeks on the diet). I'm trying to determine if there is a statistically significant difference between x1 and x2. I've decided that a paired t-test is appropriate.
I would like to perform a power analysis to make sure that my sample size is sufficient to detect a difference. I am a little shaky on this type of analysis, but, I know that I need the mean difference between x1 and x2 ( mean(x1-x2) ), the standard deviation of the difference ( std(x1-x2) ), the significance level (alpha=.05), and the desired power (0.90).
Could someone point me in the right direction? Does MATLAB have a function that can tell me the sample size needed to achieve the desired power at a given significance level, mean difference, and std of difference?
Thanks in advance for any insight.
1 个评论
Padma Naveena Ganapam
2021-3-20
Hey,
I am facing the same issue and I am not sure if the matlab function 'samplesizepwr' work for a paired ttest. Did you have any luck with it?
Please let me know.
Thanks in advance
回答(1 个)
Katharina Krösl
2019-2-9
I think this source should answer the question: https://www.mathworks.com/help/stats/sampsizepwr.html
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!