Hello,
I need help with calculating sample size for a quasi-experimental design (Pre test-post test nonequivalent control group design). For analysis, I'll be doing two sample proportion Z test to test the significance of a clinical significant difference or effect size of 10%.
For example, 70% of students meet the criteria of clear pass in the traditional (control) group (p2 = 0.70), if the proportion of clear pass in the digital intervention group is no less than 10 percentages point worse than the traditional intervention group, then the digital intervention would be considered non-inferior
P2-p1 = 0.10

๐ป0: ๐‘2 − ๐‘1 ≤ 0.10 versus ๐ป1: ๐‘2 − ๐‘1 > 0.10

How many samples I would need to test the difference in proportion 0.10 with a power of 0.80 and alpha 0.05


I was wondering if there is any code for two independent proportions power and sample size analysis for a non-inferiority design.
Thanks!