example [🇷 for BE/BA]

posted by Aceto81 – Belgium, 2008-10-17 14:30 (6106 d 11:30 ago) – Posting: # 2548
Views: 22,995

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:

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:

UA Flag
Activity
 Admin contact
23,427 posts in 4,929 threads, 1,679 registered users;
35 visitors (0 registered, 35 guests [including 9 identified bots]).
Forum time: 02:01 CEST (Europe/Vienna)

No matter what side of the argument you are on,
you always find people on your side
that you wish were on the other.    Thomas Berger

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5