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!