Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Real-life Applications Final Exam
- % Final Exam Project
- % A collection of final exam questions
- clc
- %% This section will plot Michaelis-Menten curves
- % of V-observed vs. the concentration of Remdesivir-TP for the
- % velocity of the incorporation of remdesivir by viral and
- % human RNA polymerase
- % Virus Values
- VmaxVirus = 0.75;
- KmVirus = 5.7;
- C = logspace(-2, 4);
- VobsVirus = (VmaxVirus.*C)./(C+KmVirus);
- % Human Values
- VmaxHuman = 0.81;
- KmHuman = 21;
- VobsHuman = (VmaxHuman.*C)./(C+KmHuman);
- % Graphing the functions
- hold on
- semilogx(VobsVirus)
- semilogx(VobsHuman)
- title('V Observed vs. Concentration of Remdesivir-TP for Human and Virus')
- legend('Virus', 'Human', 'Location', 'best')
- xlabel('Concentration of Remdesivir-TP(uM)')
- ylabel('V Observed')
- %% Continuing from the last section
- % Determines specific values from concentrations
- clc
- V= [0.1 10 100];
- VobsV = (VmaxVirus.*V)./(V+KmVirus)
- VobsH = (VmaxHuman.*V)./(V+KmHuman)
- TW = VobsV - VobsH
- %% This section uses a two-tailed fishers exact test to determine whether or not
- % a survival outcome is statistically significant on contingency tables
- clc, clear
- s1 = table([84;16], [80;20],'VariableNames',{'Experimental','Placebo'},'RowNames',{'Lived','Died'})
- s2 = table([840;160], [800;200],'VariableNames',{'Experimental','Placebo'},'RowNames',{'Lived','Died'})
- [h1, p1, stats1] = fishertest(s1)
- [h2, p2, stats2] = fishertest(s2)
- %% Continued from the last section
- % Runs a simulation to help determine when a cohort size will become significant
- % Will run a fishers exact test and graph the value
- clc, clear
- CohortSize = 20:10:2000;
- CSlength = length(CohortSize);
- P = [];
- for i = 1:CSlength
- C = CohortSize(i);
- b = C/2 * 0.80;
- d = C/2 * 0.20;
- c = d - d * 0.20;
- a = C/2 - c;
- s = [a b
- c d];
- s = round(s);
- [h, p, stats] = fishertest(s);
- P(i) = p;
- end
- semilogy(P)
- %plot(CohortSize, P)
- xlabel('Cohort Size')
- ylabel('p-values')
- title('p-values vs. Cohort Size')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement