<jupyter_start><jupyter_text>Randomised Control Trial: Sample Size and Power**Date:** 2021-11-15**Reference:** Activity 11.5  ScenarioIn Activity 11.1, a trial of Infliximab, a new drug to treat rheumatoid arthritis, was discussed. You were asked to specify the null and alternative hypotheses for a trial to test the scientific hypothesis that Infliximab increases the proportion of patients who undergo a 50% improvement in their condition within one year (the ACR50).  Questions<jupyter_code>from opyn.stats import epidemeology as epyn
from math import ceil<jupyter_output><empty_output><jupyter_text>(a)Obtain the sample size required in each group, with significance level 0.05, power 0.9, $\pi_{C}=$ 0.25 (where $\pi_{C}$ is the ACR50 for the control group), and practically significant difference $\pi_{T} - \pi_{C} =$ 0.1. The estimated proportion $\pi_{T}=$ 0.1 + $\pi_{C}=$ 0.35.The required sample size of each group will be 442.<jupyter_code>ceil(epyn.samplesize(0.05, 0.9, 0.35, 0.25))<jupyter_output><empty_output><jupyter_text>(b)In addition to the primary outcome, it is of interest to compare the proportions of patients in the two groups that experience a severe adverse event (in case the treatment causes severe side effects). Using the sample size you obtained in part (a) and significance level 0.05, calculate the power available to detect an increase of 5% in the proportion of patients with severe adverseevents, if the underlying proportion of patients on the standard therapy plus placebo with such events is 10%. The estimated proportion $\pi_{T}=$ 0.1 + $\pi_{C}=$ 0.15.The power to detect an increase of 5% of a severe adverse event is therefore approximately 61%.<jupyter_code>epyn.power(442, 0.05, 0.15, 0.1)<jupyter_output><empty_output><jupyter_text>(c)The trial was completed, but due to difficulties only 150 children where randomised to each group.What would be the new power for the trial?<jupyter_code>epyn.power(150, 0.05, 0.55, 0.4)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08836744882675986, 'fraction_numerical': 0.04393409885172242, 'mean_word_length': 5.485436893203883, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '211412', 'license': 'MIT', 'n_tokens_mistral': 645, 'n_tokens_neox': 564, 'n_words': 257, 'path': 'jupyter/1_medical_statistics/1_11_rct_scenario.ipynb', 'repo_name': 'ljk233/py_m249', 'size': '2003'}