example [🇷 for BE/BA]
Dear Martin,
Thanks for the example!
The reason for the NA is the fact that the program was only selecting 2 samples, instead of the minimum of 3.
This was caused by the fact that there were 2 samples after 2x Tmax.
So infact this should return an NA for the method I think (correct me if I'm wrong).
Here is an implementation:
Ace
Thanks for the example!
The reason for the NA is the fact that the program was only selecting 2 samples, instead of the minimum of 3.
This was caused by the fact that there were 2 samples after 2x Tmax.
So infact this should return an NA for the method I think (correct me if I'm wrong).
Here is an implementation:
time <- c(0.08263463, 0.52824754, 1.17358567, 1.39767757, 2.47663194, 3.19031555, 3.97925368, 6.95466074, 7.42732263, 12.08734425, 12.35692940, 13.63305248, 21.64587886, 29.33632297)
conc <- c(1.175213, 8.748377, 12.650698, 12.741200, 12.965722, 13.648985, 13.633996, 11.110552, 16.232875, 6.747145, 7.156791, 7.776978, 3.241740, 1.528261)
dat <- data.frame(time=time, conc=conc)
n_TTT_ARS=0
r.adj2=0
tp <- min(seq_along(dat$time)[dat$time>=dat$time[which.max(dat$conc)]*2])
if ((nrow(dat) - tp + 1) >=3) { #modification
for (i in
(nrow(dat)-2):(min(seq_along(dat$time)[dat$time>=dat$time[which.max(dat$conc)]*2])))
{
check <- summary(lm(log(conc)~time,dat[i:nrow(dat),]))$adj.r.squared
if ((r.adj2 - check <(0.0001))) {
n_TTT_ARS = nrow(dat)-i+1
r.adj2 = summary(lm(log(conc)~time,dat[i:nrow(dat),]))$adj.r.squared
}
}
} else {n_TTT_ARS = NA} #modification
Ace
Complete thread:
- update: bear v1.1.4 for R (a free tool for ABE) yjlee168 2008-09-17 13:33 [🇷 for BE/BA]
- update: bear v1.1.4 for R (a free tool for ABE) Helmut 2008-09-17 16:59
- update: bear v1.1.4 for R (a free tool for ABE) yjlee168 2008-09-17 21:03
- update: bear v1.1.4 for R (a free tool for ABE) martin 2008-09-19 13:13
- update: bear v1.1.4 for R (a free tool for ABE) yjlee168 2008-09-22 18:19
- update: bear v1.1.4 for R (a free tool for ABE) Helmut 2008-09-23 00:46
- update: bear v1.1.4 for R (a free tool for ABE) martin 2008-09-27 09:37
- Package lee for R Helmut 2008-09-27 14:05
- update: bear v1.1.4 for R (a free tool for ABE) martin 2008-09-27 09:37
- update: bear v1.1.4 for R (a free tool for ABE) yjlee168 2008-09-23 10:07
- update: bear v1.1.4 for R (a free tool for ABE) martin 2008-09-27 09:25
- update: bear v1.1.4 for R (a free tool for ABE) yjlee168 2008-09-29 12:03
- update: bear v1.1.4 for R (a free tool for ABE) Helmut 2008-09-29 12:10
- update: bear v1.1.4 for R (a free tool for ABE) yjlee168 2008-09-29 13:07
- modified function for selection of time points martin 2008-10-11 15:30
- modified function for selection of time points yjlee168 2008-10-11 19:45
- last 3 time points martin 2008-10-12 00:04
- modified function for selection of time points yjlee168 2008-10-16 11:20
- modified function for selection of time points Aceto81 2008-10-16 12:09
- modified code martin 2008-10-16 12:29
- modified code Aceto81 2008-10-16 14:11
- modified code martin 2008-10-16 12:29
- modified function for selection of time points Aceto81 2008-10-16 12:09
- modified function for selection of time points yjlee168 2008-10-11 19:45
- modified function for selection of time points martin 2008-10-11 15:30
- update: bear v1.1.4 for R (a free tool for ABE) yjlee168 2008-09-29 13:07
- update: bear v1.1.4 for R (a free tool for ABE) Helmut 2008-09-29 12:10
- update: bear v1.1.4 for R (a free tool for ABE) yjlee168 2008-09-29 12:03
- update: bear v1.1.4 for R (a free tool for ABE) martin 2008-09-27 09:25
- update: bear v1.1.4 for R (a free tool for ABE) Helmut 2008-09-17 16:59