We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0a68b5 commit 7a25b1aCopy full SHA for 7a25b1a
1 file changed
R/antibody_decay_function.R
@@ -25,7 +25,7 @@ antibody_decay_curve = function(
25
alpha = 0.00002192627,
26
rho = 2
27
# rho = 2 # exponential decay?
28
- )
+)
29
{
30
31
t1 = t1f(
@@ -41,10 +41,18 @@ antibody_decay_curve = function(
41
mu_y = mu_y,
42
t1 = t1)
43
44
+ phase2_rho1 <- y1 * exp(-alpha * (t - t1))
45
+ phase2_default <-
46
+ y1 * (1+ (rho-1) * (y1 ^ (rho - 1)) * alpha * (t - t1))^(-1/(rho - 1))
47
yt = ifelse(
48
t < t1,
49
y0 * exp(mu_y * t),
- y1 * (1+ (rho-1) * (y1 ^ (rho - 1)) * alpha * (t - t1))^(-1/(rho - 1))
50
+ ifelse(
51
+ rho == 1,
52
+ phase2_rho1,
53
+ phase2_default
54
+
55
+ )
56
)
57
return(yt)
58
}
0 commit comments