lambda_z estimation [🇷 for BE/BA]

posted by yjlee168 Homepage – Kaohsiung, Taiwan, 2008-09-26 10:03 (6476 d 13:22 ago) – Posting: # 2419
Views: 89,483

Dear Ace,

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.6:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Thread locked

Complete thread:

UA Flag
Activity
 Admin contact
23,655 posts in 4,993 threads, 1,570 registered users;
136 visitors (0 registered, 136 guests [including 28 identified bots]).
Forum time: 23:26 CEST (Europe/Vienna)

I have finally come to the konklusion
that a good reliable set ov bowels
iz worth more to a man
than enny quantity of brains.    Josh Billings

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