/
fomort2.html
152 lines (125 loc) · 7.71 KB
/
fomort2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>fomort2</title><meta name="generator" content="MATLAB 8.6"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2017-02-07"><meta name="DC.source" content="fomort2.m"><style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
html { min-height:100%; margin-bottom:1px; }
html body { height:100%; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#000; line-height:140%; background:#fff none; overflow-y:scroll; }
html body td { vertical-align:top; text-align:left; }
h1 { padding:0px; margin:0px 0px 25px; font-family:Arial, Helvetica, sans-serif; font-size:1.5em; color:#d55000; line-height:100%; font-weight:normal; }
h2 { padding:0px; margin:0px 0px 8px; font-family:Arial, Helvetica, sans-serif; font-size:1.2em; color:#000; font-weight:bold; line-height:140%; border-bottom:1px solid #d6d4d4; display:block; }
h3 { padding:0px; margin:0px 0px 5px; font-family:Arial, Helvetica, sans-serif; font-size:1.1em; color:#000; font-weight:bold; line-height:140%; }
a { color:#005fce; text-decoration:none; }
a:hover { color:#005fce; text-decoration:underline; }
a:visited { color:#004aa0; text-decoration:none; }
p { padding:0px; margin:0px 0px 20px; }
img { padding:0px; margin:0px 0px 20px; border:none; }
p img, pre img, tt img, li img, h1 img, h2 img { margin-bottom:0px; }
ul { padding:0px; margin:0px 0px 20px 23px; list-style:square; }
ul li { padding:0px; margin:0px 0px 7px 0px; }
ul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; }
ul li ol li { list-style:decimal; }
ol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; }
ol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; }
ol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; }
ol li ol li { list-style-type:lower-alpha; }
ol li ul { padding-top:7px; }
ol li ul li { list-style:square; }
.content { font-size:1.2em; line-height:140%; padding: 20px; }
pre, code { font-size:12px; }
tt { font-size: 1.2em; }
pre { margin:0px 0px 20px; }
pre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; }
pre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; }
pre.error { color:red; }
@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } }
span.keyword { color:#0000FF }
span.comment { color:#228B22 }
span.string { color:#A020F0 }
span.untermstring { color:#B20000 }
span.syscmd { color:#B28C00 }
.footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; }
.footer p { margin:0px; }
.footer a { color:#878787; }
.footer a:hover { color:#878787; text-decoration:underline; }
.footer a:visited { color:#878787; }
table th { padding:7px 5px; text-align:left; vertical-align:middle; border: 1px solid #d6d4d4; font-weight:bold; }
table td { padding:7px 5px; text-align:left; vertical-align:top; border:1px solid #d6d4d4; }
</style></head><body><div class="content"><h1>fomort2</h1><!--introduction--><p>standard effect on survival of a binary mixture</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#3">Syntax</a></li><li><a href="#4">Description</a></li><li><a href="#5">Example of use</a></li></ul></div><h2>Syntax<a name="3"></a></h2><p>S = <a href="../fomort2"><b>fomort2</b></a> (p, t, c1 ,c2)</p><h2>Description<a name="4"></a></h2><p>standard effects on survival: first-order-mortality. First order toxico kinetics. Hazard rate linear in the internal conc</p><p>Fomort 2 was developed for <a href="http://www.bio.vu.nl/thb/research/bib/BaasHout2007.html"><b>Baas et al 2007</b></a>. In that paper a full description can be found.</p><p>Input</p><div><ul><li>p: (8,1) matrix with parameters values</li><li>t: (nt,1) matrix with exposure times</li><li>c1: (nA,1) matrix with concentrations of toxic compound type 1</li><li>c2: (nB,1) matrix with concentrations of toxic compound type 2</li></ul></div><p>Output</p><div><ul><li>S: (nt,nA*nB) matrix with survival probabilities</li></ul></div><h2>Example of use<a name="5"></a></h2><p>see <a href="../mydata_fomort2.m"><b>mydata_fomort2</b></a></p><p class="footer"><br><a href="http://www.mathworks.com/products/matlab/">Published with MATLAB® R2015b</a><br></p></div><!--
##### SOURCE BEGIN #####
%% fomort2
% standard effect on survival of a binary mixture
%%
function S = fomort2 (p, t, c1 ,c2)
% created 2006/03/08 by Bas Kooijman, modified 2008/12/30
%% Syntax
% S = <../fomort2 *fomort2*> (p, t, c1 ,c2)
%% Description
% standard effects on survival: first-order-mortality.
% First order toxico kinetics.
% Hazard rate linear in the internal conc
%
% Fomort 2 was developed for <http://www.bio.vu.nl/thb/research/bib/BaasHout2007.html *Baas et al 2007*>. In that paper a full
% description can be found.
%
% Input
%
% * p: (8,1) matrix with parameters values
% * t: (nt,1) matrix with exposure times
% * c1: (nA,1) matrix with concentrations of toxic compound type 1
% * c2: (nB,1) matrix with concentrations of toxic compound type 2
%
% Output
%
% * S: (nt,nA*nB) matrix with survival probabilities
%% Example of use
% see <../mydata_fomort2.m *mydata_fomort2*>
global cA cB CA0 CB0 kA kB
% unpack parameters
h0 = p(1); % 1/h, blank mortality prob rate (always >0)
CA0 = p(2); % mM, No-Effect-Concentration for A (external, may be zero)
CB0 = p(3); % mM, No-Effect-Concentration for B (external, may be zero)
bA = p(4); % 1/(h*mM), killing rate for A
bB = p(5); % 1/(h*mM), killing rate for B
kA = p(6); % 1/h, elimination rate for A
kB = p(7); % 1/h, elimination rate for B
dAB = p(8); % 1/(h*mM^2), interaction rate for A and B
nt = length(t); % number of time points
nA = length(c1); % number of values for conc A
nB = length(c2); % number of values for conc B
S = zeros(nt, nA*nB); % initiate output
for j = 1:nB
cB = c2(j);
for i = 1:nA
cA = c1(i);
if 1 >= cA/ CA0 + cB/ CB0
S(:,i + (j - 1) * nA) = exp(- h0 * t);
else
[t0 ft info] = fzero('find_effect_time', 0); % no-effect-time
if info ~= 1| 1e-8 < abs(ft)
[t0 ft info] = fzero('find_effect_time', 1);
if info ~= 1 | 1e-8 < abs(ft)
fprintf('no convergence for effect time \n');
end
end
CA0B = (1 - exp(-t0 * kA)) * cA;
CB0A = (1 - exp(-t0 * kB)) * cB;
t0 = ones(nt,1) * t0;
tA = max(0,(exp(-kA * t0) - exp(-kA * t)))/ kA;
tB = max(0,(exp(-kB * t0) - exp(-kB * t)))/ kB;
tAB = max(0,(exp(-(kA + kB) * t0) - exp(-(kA + kB) * t)))/ (kA + kB);
gA = - cA * tA + (cA - CA0B) * max(0,t - t0);
gB = - cB * tB + (cB - CB0A) * max(0,t - t0);
gAB = cA * cB * tAB + (cA - CA0B) * (cB - CB0A) * max(0,t - t0) ...
- cA * (cB - CB0A) * tA - (cA - CA0B) * cB * tB ;
a = h0 * t + max(0,bA * gA + bB * gB + dAB * gAB);
S(:,i + (j - 1) * nA) = exp(-a);
end
end
end
##### SOURCE END #####
--></body></html>