Risherd
☆    

Mexico,
2012-08-27 22:39
(4258 d 19:33 ago)

Posting: # 9113
Views: 7,198
 

 Sequence effect bear vs WinNonlin opposite results [Software]

Hello everybody!

I did a software validation of WinNonlin with R program and in the ANOVA analysis I got the following results for the sequence effect:

AUC0-t.

-BEAR
Tests of Hypothesis using the Type III MS for SUBJECT(SEQUENCE) as an error term

Sequence Effect: F-value = 8.4; Pr>F=0.00958

-WINNONLIN

Sequence Effect: F-value = 4.593; P_value = 0.07053

As you can see according to bear there is a sequence effect for AUCo-t while in WinNonlin it's not. This same situation happen with AUC0-Inf.

However, the results for NCA, period, drug, seq(subj) effect, Confidence Intervals are exactly the same in both programs. So, why only the sequence effect is different?

Thank you for your answer on understanding this situation.

Risherd.
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2012-08-27 23:35
(4258 d 18:38 ago)

@ Risherd
Posting: # 9114
Views: 6,843
 

 Sequence effect bear vs WinNonlin opposite results

Dear Risherd,
I like to quickly respond to your question here.
  1. In R, there is no way to calculate Type III MS (still same right now?) when we developed bear, but Type I MS. SAS can calculate both. Only when you have a complete crossover study design (same subj. # for ref. and test), Type I MS will be equal to Type III MS, as you can see from your bear output file. That's what we do with bear.
  2. We validated ANOVA results obtained from bear with SAS whiles ago. And we got the same results using the dataset of a complete crossover study design.
  3. I don't know how WNL calculates Type I/III MS. But I would strongly suggest that you probably should use SAS to confirm your validations.

❝ As you can see according to bear there is a sequence effect for AUCo-t while in WinNonlin it's not. This same situation happen with AUC0-Inf.

❝ However, the results for NCA, period, drug, seq(subj) effect, Confidence Intervals are exactly the same in both programs. So, why only the sequence effect is different?


All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
ElMaestro
★★★

Denmark,
2012-08-28 00:37
(4258 d 17:35 ago)

@ Risherd
Posting: # 9115
Views: 6,446
 

 Sequence effect bear vs WinNonlin opposite results

Hi Risherd,

I think this issue is related to the denominator of the F-test.

The sequence factor level is unique between subjects (not within) and therefore the sequence effect is often tested with the between-subject-MS in the denominator - this is what the bogus random statement in SAS effectuates. I think WinNonLin doesn't do it this way.

I have a feeling Bear does this as well. It can be rather easily implemented, although at the outset R will not by default do it this way but will spit out a 'normal' table where all fixed factors are tested with the residual MS in the denominator.

Try this:
  1. Look at the anova table from WNL and add the sums of squares incl. the residual. If they add up to the null sums of sqaures, then it means that WNL does not test the Seq effect with the between-subject variability in the denominator for the F-test.
  2. Try to remove the bogus statement from the SAS script and compare directly with WNL.
PS - to yjlee: For type III SS you can use drop1 in R, or you can work around manually by adding and removing factors in the lm specification. For Seq, the latter might be the best option since Subjects are uniquely split out on Seqs. A drop1 with Subj, Seq, Per, Trt as factors will for Seq just give flat zero (plusminus some machine/convergence precision) due to the design.

Pass or fail!
ElMaestro
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2012-08-29 04:53
(4257 d 13:19 ago)

@ ElMaestro
Posting: # 9120
Views: 6,398
 

 Sequence effect bear vs WinNonlin opposite results

Dear ElMaestro,

I think we have discussed this question about two years ago. Please see your previous comments here. Thus, why I said there was no way to calculate Type III SS with R as SAS did.

❝ PS - to yjlee: For type III SS you can use drop1 in R, or you can work around manually by adding and removing factors in the lm specification. For Seq, the latter might be the best option since Subjects are uniquely split out on Seqs. A drop1 with Subj, Seq, Per, Trt as factors will for Seq just give flat zero (plusminus some machine/convergence precision) due to the design.


All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2012-08-28 16:39
(4258 d 01:33 ago)

@ Risherd
Posting: # 9118
Views: 7,165
 

 SAS Type I/III ↔ WinNonlin partial/sequential tests

Dear Risherd!

It is not helpful if you give numerical results without stating the data set you used (+ the version of WinNonlin). SAS’ Type III is not given by WinNonlin – only sequential and partial tests. Sequential = SAS Type I, but (quoting WinNonlin’s User’s Guide):

The partial tests in LinMix are not equivalent to the Type III method in SAS though they coincide in most situations.
The Partial Tests worksheet is created by testing each model term given every other model term. Unlike sequential tests, partial tests are invariant under the order in which model terms are listed in the Fixed Effects tab. Partial tests factor out of each model term the contribution attribut­able to the remaining model terms.
This is computed by modifying the basis created by the QR factorization to yield a basis that more closely resembles that found in balanced data.
For fixed effects models, certain properties can be stated for the two types of ANOVA. For the sequential ANOVA, the sums of squares are statistically independent. Also, the sum of the indi­­vi­­dual sums of squares is equal to the model sum of squares; which means the ANOVA represents a partitioning of the model sum of squares. However, some terms in ANOVA may be conta­mi­nat­ed with undesired effects. The partial ANOVA is designed to eliminate the conta­mi­nation problem, but the sums of squares are correlated and do not add up to the model sums of squares. The mixed effects tests have similar properties.

(my emphasis)

Or Phoenix User’s Guide:

Sequential Tests worksheet
   The Sequential Tests worksheet is created by testing each model term sequentially. The first model term is tested to determine whether or not it should enter the model. Then the second model term is tested to determine whether or not it should enter the model, given that the first term is in the model. Then the third model term is tested to determine whether or not it should enter the model, given that the first two terms are in the model. The model term tests continue until all model terms are exhausted.
The tests are computed using a QR factorization of the XY matrix. The QR factorization is seg­ment­ed to match the number of columns that each model term contributes to the X matrix.
Partial Tests worksheet
   The Partial Tests worksheet is created by testing each model term given every other model term. Unlike sequential tests, partial tests are invariant under the order in which model terms are listed in the Fixed Effects tab. Partial tests factor out of each model term the contribution attri­but­able to the remaining model terms.
This is computed by modifying the basis created by the QR factorization to yield a basis that more closely resembles that found in balanced data.
ANOVA
   For fixed effects models, certain properties can be stated for the two types of ANOVA. For the sequential ANOVA, the sums of squares are statistically independent. Also, the sum of the indi­vi­dual sums of squares is equal to the model sum of squares; which means the ANOVA repre­sents a partitioning of the model sum of squares. However, some terms in ANOVA may be contam­inat­ed with undesired effects. The partial ANOVA is designed to eliminate the contami­na­tion problem, but the sums of squares are correlated and do not add up to the model sums of squares. The mixed effects tests have similar properties.


Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
ElMaestro
★★★

Denmark,
2012-08-28 21:13
(4257 d 20:59 ago)

@ Risherd
Posting: # 9119
Views: 6,368
 

 Sequence effect bear vs WinNonlin opposite results

Hi Risherd,

if you paste the ANOVA tables from Winnonlin and Bear then it will be possible thorugh the MS to immediately determine if the source of this phenomenon is linked to type I/III SS phenomena or to the F-test's denominator.

Thanks.

Pass or fail!
ElMaestro
Risherd
☆    

Mexico,
2012-08-29 20:09
(4256 d 22:04 ago)

@ ElMaestro
Posting: # 9125
Views: 6,342
 

 Sequence effect bear vs WinNonlin opposite results

Thank you all for your answers and excuse me for the delay of my reply

In request to ElMaestro and Helmut

❝ if you paste the ANOVA tables from Winnonlin and Bear then it will be possible thorugh the MS to....determine...the source of this phenomenon....


here are my results from AUC0-t using WinNonlin 6.3.


- WinNonlin

- Response: Log10(AUCall)

Dependent     |  Units  |      Hypotesis     | DF |    SS    |    MS   | F-value  | P-value
-------------------------------------------------------------------------------------------
Log10(AUCall) | h*µg/mL | Sequence           |  1 | 0.086471 | 0.086471| 4.348724 | 0.07053
Log10(AUCall) | h*µg/mL | Sequence*Volunteer |  8 | 0.019884 | 0.019884| 28.513921| 0.00004
Log10(AUCall) | h*µg/mL | Product            |  1 | 0.014607 | 0.014067| 7.639860 | 0.02452
Log10(AUCall) | h*µg/mL | Period             |  1 | 0.007480 | 0.007480| 3.912380 | 0.08331
Log10(AUCall) | h*µg/mL | Error              |  8 | 0.015296 | 0.001912

- Bear

- Response:
Statistical analysis (ANOVA(lm))   
-----------------------------------------------------------
   Dependent Variable: log(AUC0t)     

Analysis of Variance Table

Response: log(AUC0t)
          Df  Sum Sq  Mean Sq F value    Pr(>F)   
prd        1 0.08335 0.083349  22.543  0.001449 **
drug       1 0.06330 0.063303  17.122  0.003263 **
subj(seq)  8 0.84340 0.105425  28.514 4.248e-05 ***
Residuals  8 0.02958 0.003697                     
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Analysis of Variance Table

Response: log(AUC0t)
           DF  Type III SS  Mean Square  F Value    Pr > F
prd         1      0.08335     0.083349   22.543 0.0014490
drug        1      0.06330     0.063303   17.122 0.0032632
subj(seq)   8      0.84340     0.105425   28.514 0.0000425
-----------------------------------------------------------

Tests of Hypothesis using the Type I MS for
SUBJECT(SEQUENCE) as an error term
            Df Sum Sq Mean Sq F value Pr(>F) 
seq          1 0.4585  0.4585   8.093 0.0107 *
Residuals   18 1.0196  0.0566                 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Tests of Hypothesis using the Type III MS for
SUBJECT(SEQUENCE) as an error term
            Df Sum Sq Mean Sq F value Pr(>F) 
seq          1 0.4585  0.4585   8.093 0.0107 *
Residuals   18 1.0196  0.0566                 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


I found out that WinNonlin estimate the F-value like this
Sequence effect
F-value = MS sequence / MS sequence*volunteer


Using Bear data and applying the previous formula I obtain the same result of WinNonlin
F-value = 0.4585/0.105425 = 4.34.

I think that is the root of the situation, and please correct me if I´m wrong.

Gracias! ;-)
ElMaestro
★★★

Denmark,
2012-08-29 21:42
(4256 d 20:30 ago)

@ Risherd
Posting: # 9126
Views: 6,307
 

 Division by 0.0566?

Hi Risherd,

❝ I found out that WinNonlin estimate the F-value like this

Sequence effect

F-value = MS sequence / MS sequence*volunteer


❝ Using Bear data and applying the previous formula I obtain the same result of WinNonlin

F-value = 0.4585/0.105425 = 4.34.


Quick note: Looks to me like Bear in your case is diving the Seq MS with the residual coming from a model with just Seq? I am not sure how this value of 0.0566 entered the scene. The current standard, as far as I know, is to divide with the subject MS just like you describe (MS sequence*volunteer is the same as MS volunteer*sequence, which is the same as MS subject in sequence, which is the same as MS sequence in subject, although the latter is a cosmic mindf%&#er to interpret).

Pass or fail!
ElMaestro
Tushar.g
☆    

India,
2012-09-11 15:29
(4244 d 02:43 ago)

@ Risherd
Posting: # 9177
Views: 6,148
 

 Related to AUC Parameter…

Hi Risherd,

Nice thread it was.

Just FYI…
From WinNonlin, Please do consider AUClast parameter as a AUCo-t parameters. AUCall is little bit extrapolated as it considers all sample points including zero concentration (if data contains zero or BLOQ at end points).

Please search this forum for more information. It has ample of information on AUCall and its calculation.

With kind Regards,
Tushar
UA Flag
Activity
 Admin contact
22,993 posts in 4,828 threads, 1,651 registered users;
107 visitors (1 registered, 106 guests [including 3 identified bots]).
Forum time: 18:13 CEST (Europe/Vienna)

Never never never never use Excel.
Not even for calculation of arithmetic means.    Martin Wolfsegger

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