lambda_z estimation [🇷 for BE/BA]
Dear Ace,
We tried three examples with codes as follows:
Ex.01
Ex. 02
Ex. 03
The final result showed that only Ex. 01 got the exactly same data points (5's) with that of WinNonlin. With Ex. 02 and Ex. 03, your method picked 5's and 4's data points, respectively, compared to 4's and 3's picked by WinNonlin. There were still something wrong with your method/codes.
We tried three examples with codes as follows:
Ex.01
b<-c(0,0.25,0.5,0.75,1,1.5,2,3,4,8,12,24)
c<-c(0,36.1,125,567,963,1343,1739,1604,1460,797,383,72)
dat <- data.frame(time=b,conc=c)
n_lambda=0
r.adj=0
for (i in (nrow(dat)-3):(which.max(dat$conc)+1)) {
if (r.adj - round(summary(lm(log(conc)~time,dat[i:nrow(dat),]))$adj.r.squared,4) <
(0.0001)) {
n_lambda <- nrow(dat)-i+1
r.adj <- summary(lm(log(conc)~time,dat[i:nrow(dat),]))$adj.r.squared
}
}
summary(lm(log(conc)~time,dat[i:nrow(dat),]))
Call:
lm(formula = log(conc) ~ time, data = dat[i:nrow(dat), ])
Residuals:
8 9 10 11 12
-0.01329 0.04253 0.03672 -0.09658 0.03062
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.843188 0.050394 155.64 5.85e-07 ***
time -0.149881 0.003962 -37.83 4.06e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.06733 on 3 degrees of freedom
Multiple R-squared: 0.9979, Adjusted R-squared: 0.9972
F-statistic: 1431 on 1 and 3 DF, p-value: 4.063e-05
Ex. 02
b<-c(0,0.25,0.5,0.75,1,1.5,2,3,4,8,12,24)
d<-c(0,84.5,192,629,873,1246,1633,1375,1006,616,379,84.4)
dat <- data.frame(time=b,conc=d)
n_lambda=0
r.adj=0
for (i in (nrow(dat)-3):(which.max(dat$conc)+1)) {
if (r.adj - round(summary(lm(log(conc)~time,dat[i:nrow(dat),]))$adj.r.squared,4) <
(0.0001)) {
n_lambda <- nrow(dat)-i+1
r.adj <- summary(lm(log(conc)~time,dat[i:nrow(dat),]))$adj.r.squared
}
}
summary(lm(log(conc)~time,dat[i:nrow(dat),]))
Call:
lm(formula = log(conc) ~ time, data = dat[i:nrow(dat), ])
Residuals:
8 9 10 11 12
0.11336 -0.07056 -0.04683 -0.01832 0.02236
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.498518 0.062411 120.1 1.27e-06 ***
time -0.128555 0.004907 -26.2 0.000122 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.08338 on 3 degrees of freedom
Multiple R-squared: 0.9956, Adjusted R-squared: 0.9942
F-statistic: 686.5 on 1 and 3 DF, p-value: 0.0001220
Ex. 03
b<-c(0,0.5,0.75,1,1.5,2,3,4,8,12,24)
c<-c(0,69.7,167,602,1023,1388,1481,1346,658,336,84)
dat <- data.frame(time=b,conc=c)
n_lambda=0
r.adj=0
for (i in (nrow(dat)-3):(which.max(dat$conc)+1)) {
if (r.adj - round(summary(lm(log(conc)~time,dat[i:nrow(dat),]))$adj.r.squared,4) <
(0.0001)) {
n_lambda <- nrow(dat)-i+1
r.adj <- summary(lm(log(conc)~time,dat[i:nrow(dat),]))$adj.r.squared
}
}
summary(lm(log(conc)~time,dat[i:nrow(dat),]))
Call:
lm(formula = log(conc) ~ time, data = dat[i:nrow(dat), ])
Residuals:
8 9 10 11
0.13274 -0.03963 -0.16840 0.07528
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.6155 0.1541 49.41 0.000409 ***
time -0.1358 0.0109 -12.46 0.006376 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.1631 on 2 degrees of freedom
Multiple R-squared: 0.9873, Adjusted R-squared: 0.9809
F-statistic: 155.3 on 1 and 2 DF, p-value: 0.006376
The final result showed that only Ex. 01 got the exactly same data points (5's) with that of WinNonlin. With Ex. 02 and Ex. 03, your method picked 5's and 4's data points, respectively, compared to 4's and 3's picked by WinNonlin. There were still something wrong with your method/codes.
—
All the best,
-- Yung-jin Lee
bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
All the best,
-- Yung-jin Lee
bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here

Complete thread:
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-12 20:53 [🇷 for BE/BA]
- bear v1.0.0 for R - first impressions Helmut 2008-07-14 04:12
- bear v1.0.0 for R - first impressions yjlee168 2008-07-14 10:26
- bear v1.0.0 for R - first impressions Helmut 2008-07-14 14:02
- bear v1.0.0 for R - first impressions yjlee168 2008-07-14 18:12
- bear v1.0.0 for R... Helmut 2008-07-14 18:56
- bear v1.0.0 for R... yjlee168 2008-07-14 19:30
- bear v1.0.0 for R... Helmut 2008-07-14 20:35
- bear v1.0.0 for R... yjlee168 2008-07-14 19:30
- bear v1.0.0 for R... Helmut 2008-07-14 18:56
- bear v1.0.0 for R - first impressions yjlee168 2008-07-15 09:44
- bear v1.0.0 for R - first impressions yjlee168 2008-07-14 18:12
- bear v1.0.0 for R - first impressions Helmut 2008-07-14 14:02
- bear v1.0.0 for R - first impressions yjlee168 2008-07-14 10:26
- bear v1.0.0 - a data analytical tool for ABE in R martin 2008-07-14 12:18
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-14 19:02
- bear v1.0.0 - a data analytical tool for ABE in R Aceto81 2008-07-15 10:07
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-16 07:22
- bear v1.0.0 - a data analytical tool for ABE in R Aceto81 2008-07-16 09:47
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-16 21:32
- bear v1.0.0 - a data analytical tool for ABE in R Aceto81 2008-07-16 09:47
- lambda_z estimation yjlee168 2008-09-23 12:13
- lambda_z estimation d_labes 2008-09-23 14:41
- lambda_z estimation yjlee168 2008-09-24 22:41
- lambda_z estimation Aceto81 2008-09-25 10:56
- lambda_z estimation yjlee168 2008-09-25 21:00
- lambda_z estimationyjlee168 2008-09-26 08:03
- lambda_z estimation Aceto81 2008-09-26 10:25
- lambda_z estimation yjlee168 2008-09-28 00:08
- lambda_z estimation yjlee168 2008-09-29 13:32
- WinNonlin 5.2.1 vs. 6 beta Helmut 2008-09-29 15:54
- WinNonlin 5.2.1 vs. 6 beta yjlee168 2008-09-29 18:45
- WinNonlin 5.2.1 vs. 6 beta --> new finding yjlee168 2008-09-30 08:10
- Example 4 in SASophylistic d_labes 2008-09-30 09:43
- Example 4 in SASophylistic yjlee168 2008-09-30 12:23
- Example 4 in SASophylistic d_labes 2008-09-30 09:43
- WinNonlin 5.2.1 vs. 6 beta Helmut 2008-09-29 15:54
- lambda_z estimation Aceto81 2008-09-26 10:25
- TTT method for lambda_z estimation yjlee168 2008-09-30 12:34
- TTT method for lambda_z estimation d_labes 2008-09-30 14:48
- TTT method for lambda_z estimation yjlee168 2008-09-30 20:28
- TTT method plus best fit combined d_labes 2008-10-01 08:43
- AIC or ARS as the best fit criterion? yjlee168 2008-10-02 12:40
- AIC or ARS as the best fit criterion? d_labes 2008-10-02 13:59
- AIC or ARS as the best fit criterion? yjlee168 2008-10-02 12:40
- TTT method plus best fit combined d_labes 2008-10-01 08:43
- TTT method for lambda_z estimation yjlee168 2008-09-30 20:28
- TTT method for lambda_z estimation Aceto81 2008-09-30 15:11
- TTT method for lambda_z estimation yjlee168 2008-09-30 19:57
- TTT method for lambda_z estimation Aceto81 2008-10-01 14:18
- TTT method for lambda_z estimation yjlee168 2008-10-02 12:29
- TTT method for lambda_z estimation Aceto81 2008-10-03 15:33
- TTT method for lambda_z estimation yjlee168 2008-10-03 21:22
- TTT method for lambda_z estimation Aceto81 2008-10-03 15:33
- TTT method for lambda_z estimation yjlee168 2008-10-02 12:29
- TTT method for lambda_z estimation Aceto81 2008-10-01 14:18
- TTT method for lambda_z estimation yjlee168 2008-09-30 19:57
- TTT method for lambda_z estimation d_labes 2008-09-30 14:48
- lambda_z estimation d_labes 2008-09-23 14:41
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-16 07:22
- bear v1.0.0 - a data analytical tool for ABE in R Aceto81 2008-07-15 10:07
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-14 19:02
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-07-22 14:35
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-23 09:55
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-07-24 10:04
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-25 20:38
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-07-28 08:42
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-25 20:38
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-23 16:10
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-09-24 22:00
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 09:03
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 13:52
- bear v1.0.0 - a data analytical tool for ABE in R Helmut 2008-09-25 14:39
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 14:55
- bear v1.0.0 - a data analytical tool for ABE in R Helmut 2008-09-25 15:33
- GLM in R and the power to know d_labes 2008-09-25 16:45
- GLM in R and the power to know ElMaestro 2008-09-25 19:23
- nesting in R? yjlee168 2008-09-25 20:49
- nesting in R? ElMaestro 2008-09-25 22:01
- lm in R Helmut 2008-09-26 00:23
- nesting in R? yjlee168 2008-09-25 20:49
- GLM in R and the power to know ElMaestro 2008-09-25 19:23
- GLM in R and the power to know d_labes 2008-09-25 16:45
- bear v1.0.0 - a data analytical tool for ABE in R Helmut 2008-09-25 15:33
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 14:55
- bear v1.0.0 - a data analytical tool for ABE in R Helmut 2008-09-25 14:39
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 13:52
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 09:03
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-09-24 22:00
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-07-24 10:04
- Type III SS in balanced, crossover BE studies? yjlee168 2008-10-18 21:03
- Type III SS in balanced, crossover BE studies? ElMaestro 2008-10-21 13:09
- Type III SS in balanced, crossover BE studies? yjlee168 2008-10-21 13:19
- Only balanced, crossover BE studies? d_labes 2008-10-21 14:31
- Only balanced, crossover BE studies? yjlee168 2008-10-21 19:01
- Only balanced, crossover BE studies? ElMaestro 2008-10-24 11:26
- Thread locked Helmut 2008-10-24 11:58
- Only balanced, crossover BE studies? ElMaestro 2008-10-24 11:26
- Only balanced, crossover BE studies? yjlee168 2008-10-21 19:01
- Only balanced, crossover BE studies? d_labes 2008-10-21 14:31
- Type III SS in balanced, crossover BE studies? yjlee168 2008-10-21 13:19
- Type III SS in balanced, crossover BE studies? ElMaestro 2008-10-21 13:09
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-23 09:55
- bear v1.0.0 for R - first impressions Helmut 2008-07-14 04:12