Never use Excel [🇷 for BE/BA]
❝ Please check the data you've posted in the column "lin/log".
THX, I stand corrected! I should have observed Martin’s advice:
❝ never never never never use excel for any statistical calculations
Plain R
time <- c(0.00, 1.00, 1.50, 2.00, 2.50, 3.00, 3.50, 4.00, 4.33,
4.67, 5.00, 5.33, 5.67, 6.00, 6.33, 6.67, 7.00, 7.50,
8.00, 10.00, 12.00, 16.00, 24.00, 36.00, 48.00, 72.00, 96.00)
conc <- c(0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 1.518, 5.027,
12.700, 22.210, 18.013, 22.332, 30.500, 24.290, 31.676, 32.647,
45.512, 95.827, 120.261, 89.598, 41.572, 24.576, 9.237, 4.897,
1.976, 1.287)
data <- data.frame(time, conc, lin=0, linlog=0)
delta.t <- diff(data$time)
delta.c <- diff(data$conc)
for (j in seq_along(delta.t)) {
# linear trapezoidal method
data$lin[j] <- 0.5*delta.t[j]*sum(data$conc[j+1], data$conc[j])
# lin-up/log-down trapezoidal method
if (delta.c[j] < 0) { # decreasing : log trapezoidal method
data$linlog[j] <- delta.t[j]*delta.c[j]/log(data$conc[j+1]/data$conc[j])
} else { # increasing or equal: linear trapezoidal method
data$linlog[j] <- data$lin[j]
}
}
data$lin <- cumsum(data$lin)
data$linlog <- cumsum(data$linlog)
print(round(data, 4), row.names=FALSE)
time conc lin linlog
0.00 0.000 0.0000 0.0000
1.00 0.000 0.0000 0.0000
1.50 0.000 0.0000 0.0000
2.00 0.000 0.0000 0.0000
2.50 0.000 0.0000 0.0000
3.00 0.000 0.0000 0.0000
3.50 0.000 0.0000 0.0000
4.00 1.518 0.3795 0.3795
4.33 5.027 1.4594 1.4594
4.67 12.700 4.4730 4.4730
5.00 22.210 10.2332 10.2332
5.33 18.013 16.8700 16.8458
5.67 22.332 23.7286 23.7045
6.00 30.500 32.4459 32.4217
6.33 24.290 41.4862 41.4232
6.67 31.676 51.0005 50.9375
7.00 32.647 61.6138 61.5508
7.50 45.512 81.1535 81.0905
8.00 95.827 116.4883 116.4253
10.00 120.261 332.5763 332.5133
12.00 89.598 542.4353 540.8702
16.00 41.572 804.7753 791.0362
24.00 24.576 1069.3673 1049.6994
36.00 9.237 1272.2453 1237.8016
48.00 4.897 1357.0493 1319.8698
72.00 1.976 1439.5253 1397.1153
96.00 1.287 1478.6813 1435.6823
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
![[image]](https://static.bebac.at/img/CC by.png)
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- AUC calculation in bear pjs 2017-05-21 15:57 [🇷 for BE/BA]
- lin-up/log-down is bear’s default Helmut 2017-05-21 17:32
- lin-up/log-down any regulatory recommendation? pjs 2017-05-21 19:08
- lin-up/log-down any regulatory recommendation? Helmut 2017-05-21 19:14
- lin-up/log-down any regulatory recommendation? pjs 2017-05-21 19:33
- lin-up/log-down any regulatory recommendation? Helmut 2017-05-21 19:14
- lin-up/log-down is bear’s default yjlee168 2017-05-21 20:08
- lin-up/log-down is bear’s default Yura 2017-05-25 12:52
- zero (0), missing (NA), or BLLOQ (0 or NA) in bear (II) yjlee168 2017-05-25 14:38
- zero (0), missing (NA), or BLLOQ (0 or NA) in bear (II) Yura 2017-05-25 15:17
- zero (0), missing (NA), or BLLOQ (0 or NA) in bear (II) yjlee168 2017-05-25 14:38
- lin-up/log-down is bear’s default Yura 2017-05-25 12:52
- lin-up/log-down is bear’s default Astea 2017-05-22 02:12
- Never use ExcelHelmut 2017-05-22 13:19
- lin-up/log-down any regulatory recommendation? pjs 2017-05-21 19:08
- lin-up/log-down is bear’s default Helmut 2017-05-21 17:32