Rounding or not to rounding [🇷 for BE/BA]

posted by yjlee168 Homepage – Kaohsiung, Taiwan, 2010-05-04 23:27 (5480 d 08:32 ago) – Posting: # 5287
Views: 24,755

Dear Helmut and D. Labes,

Sorry about this. I didn't notice that this thread was about bear at the beginning until I saw the edited footnote by Helmut. Thanks you all for all messages here.

❝ Just discovered a little problem. bear log-transforms raw values and rounds them to three significant digits. That's nasty, [...]



Yes. Then I tested bear (v2.5.0, not released yet!) to compare the runs between the pre-transformed manually Cmax to 3 digits and internally transformed with the model (lnCmax<- lm(log(Cmax) ~ seq + subj:seq + prd + drug , data=TotalData)) as suggested by D. Labes, using a 2x2x2 crossover demo dataset in bear (single-dosed). I got the same results as follows. I think two methods are taking the same values to calculate under R, not manually pre-transformed values. That's why no difference is observed.

- Pre-transformed manually---
  Statistical analysis (ANOVA(lm))   
--------------------------------------------------------------------------
  Dependent Variable: lnCmax                                             

Type I SS
Analysis of Variance Table

Response: lnCmax
          Df   Sum Sq  Mean Sq F value Pr(>F)
seq        1 0.000690 0.000690  0.0388 0.8472
prd        1 0.018169 0.018169  1.0205 0.3323
drug       1 0.036238 0.036238  2.0354 0.1792
subj(seq) 12 0.283676 0.023640  1.3278 0.3155
Residuals 12 0.213641 0.017803               

Type III SS
Single term deletions

Model:
lnCmax ~ seq + subj:seq + prd + drug
          Df Sum of Sq     RSS     AIC F value  Pr(F)
<none>                 0.21364 -104.52               
prd        1  0.018169 0.23181 -104.23  1.0205 0.3323
drug       1  0.036238 0.24988 -102.13  2.0354 0.1792
subj(seq) 12  0.283676 0.49732 -104.86  1.3278 0.3155

Tests of Hypothesis for SUBJECT(SEQUENCE) as an error term

Error: subj
          Df  Sum Sq   Mean Sq F value Pr(>F)
prd:drug   1 0.00069 0.0006903  0.0292 0.8672
Residuals 12 0.28368 0.0236397               

Error: Within
          Df   Sum Sq  Mean Sq F value Pr(>F)
prd        1 0.018169 0.018169  1.0205 0.3323
drug       1 0.036238 0.036238  2.0354 0.1792
Residuals 12 0.213641 0.017803               

Intra_subj. CV = 100*sqrt(abs(exp(MSResidual)-1)) = 13.4025 %
Inter_subj. CV = 100*sqrt(abs(exp((MSSubject(seq)-MSResidual)/2)-1)) = 5.4059 %
    MSResidual = 0.01780339
MSSubject(seq) = 0.0236397
[...] **************** Classical (Shortest) 90% C.I. for lnCmax ****************

  Point_estimate CI90_lower CI90_upper
1        107.460     98.223    117.566
[...]


--- internally transformed method ---

  Statistical analysis (ANOVA(lm))   
--------------------------------------------------------------------------
  Dependent Variable: lnCmax                                             

Type I SS
--- internally transformed method ---
Analysis of Variance Table

Response: log(Cmax)
          Df   Sum Sq  Mean Sq F value Pr(>F)
seq        1 0.000690 0.000690  0.0388 0.8472
prd        1 0.018169 0.018169  1.0205 0.3323
drug       1 0.036238 0.036238  2.0354 0.1792
subj(seq) 12 0.283676 0.023640  1.3278 0.3155
Residuals 12 0.213641 0.017803               

Type III SS
Single term deletions

Model:
log(Cmax) ~ seq + subj:seq + prd + drug
          Df Sum of Sq     RSS     AIC F value  Pr(F)
<none>                 0.21364 -104.52               
prd        1  0.018169 0.23181 -104.23  1.0205 0.3323
drug       1  0.036238 0.24988 -102.13  2.0354 0.1792
subj(seq) 12  0.283676 0.49732 -104.86  1.3278 0.3155

Tests of Hypothesis for SUBJECT(SEQUENCE) as an error term

Error: subj
          Df  Sum Sq   Mean Sq F value Pr(>F)
prd:drug   1 0.00069 0.0006903  0.0292 0.8672
Residuals 12 0.28368 0.0236397               

Error: Within
          Df   Sum Sq  Mean Sq F value Pr(>F)
prd        1 0.018169 0.018169  1.0205 0.3323
drug       1 0.036238 0.036238  2.0354 0.1792
Residuals 12 0.213641 0.017803               

Intra_subj. CV = 100*sqrt(abs(exp(MSResidual)-1)) = 13.4025 %
Inter_subj. CV = 100*sqrt(abs(exp((MSSubject(seq)-MSResidual)/2)-1)) = 5.4059 %
    MSResidual = 0.01780339
MSSubject(seq) = 0.0236397               
[...] **************** Classical (Shortest) 90% C.I. for lnCmax ****************

  Point_estimate CI90_lower CI90_upper
1        107.460     98.223    117.566
[...]

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:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,670 registered users;
76 visitors (0 registered, 76 guests [including 12 identified bots]).
Forum time: 07:59 CEST (Europe/Vienna)

It’s always fun to have your models validated,
but is way more fun to have them trashed.
Finding out you are completely wrong
is a great part of science.    G. Randall Gladstone

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