Keep in mind you can use "log" to calculate the natural logs of values. Also recall how you created a Boolean expression in Investigation 3.1 to find the p-value from the simulated results.
VacInfCount = rhyper(10000, 210, 4985, 2584)
# 210 is the number of successes (M)
# 4985 is the number of failures (N - M)
# 2584 is the sample size (n)
UnvacInfCount = 210 - VacInfCount
Unvacphat = UnvacInfCount/2584
Open the CPRvCC.jmp file. The first column is the response variable (survived to discharge from hospital or not) and the second column is the explanatory variable.
Close the new windows (donβt save changes). Now use the pull down menu on the script item and select Edit. The lines preceded by "//" are comments. Uncomment the resultCloseWindow command, change the "wait" from one to zero, and the number of trials from 1 to 100. Press Run.
At the end you will have the results for 100 hypothetical studies where the rows and columns are fixed and we store how many survivors end up in the CPR group. You can calculate the number of successes in the CC group using 64 β count.