Helmut ★★★ ![]() ![]() Vienna, Austria, 2012-10-26 21:35 (4558 d 00:31 ago) Posting: # 9462 Views: 12,933 |
|
Dear all, Jiří Hofmann brought one subtlety to my attention. I set up the pooled analysis with Sequence + Stage + Period(Stage) + Treatment [fixed] and Subject(Sequence × Stage) [random].For Example 2 I got: User-Specified Confidence Level for CI's and Power = 94.1200 When we specified all effects fixed (EMA?), Phoenix/WinNonlin (tested 6.2.51, 6.3beta, 6.3) spits out: ERROR 11050: Parsing error: The containing term must be in the model. OK, since in PHX/WNL the BE-module sits on top of the LME-engine I set up the model directly in LME. Could reproduce the mixed model: Least squares means … giving back-transformed 101.4544 (88.4452, 116.3770) , identical to BE-wizard’s results.I get the same values in the all-fixed model – but could not request LSMeans any more; otherwise I got the same error like in the BE-wizard. Though we don’t need these values in the BE assessment I would be interested how other software deals with it (SAS, R?). — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
ElMaestro ★★★ Denmark, 2012-10-26 22:14 (4557 d 23:51 ago) @ Helmut Posting: # 9463 Views: 11,155 |
|
Hi Helmut, ❝ For Example 2 I got: ❝ When we specified all effects fixed (EMA?), Phoenix/WinNonlin (tested 6.2.51, 6.3beta, 6.3) spits out: ❝ This should absolutely work, I think. Either it is the syntax that was wrong or PHX/WNL is flawed? ❝ OK, since in PHX/WNL the BE-module sits on top of the LME-engine I set up the model directly in LME. Could reproduce the mixed model: ❝ … giving back-transformed ❝ I get the same values in the all-fixed model – but could not request LSMeans any more; otherwise I got the same error like in the BE-wizard. Though we don’t need these values in the BE assessment I would be interested how other software deals with it (SAS, R?). You don't need a mixed model when you have only one sigma in play (this isn't a replicated study I presume?). In the simple non-replicated case fitting a mixed model with subject as random should give the same result as the normal linear model based on all fixed. If there are subtle differences at some decimal then this sounds most likely just like either a rounding phenomenon, or a convergence issue where somehow the optimiser in this case is capable of finding smaller sigma when the mixed model is applied. The normal linear model can be solved exactly with e.g. R at least to the extent we can rely on its numerical stability for inversion of XtX; I would take a look at sigma that way and see what the truth ![]() — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2012-10-26 22:25 (4557 d 23:41 ago) @ ElMaestro Posting: # 9464 Views: 11,175 |
|
Dear ElMaestro! ❝ ❝ For Example 2 I got: ❝ Where is example 2?? At the end of Madame Potvin’s paper. For convenience: sub <- as.factor(sort(rep(c(1:20),2))) ❝ This should absolutely work, I think. Either it is the syntax that was wrong or PHX/WNL is flawed? Well, the flaw sits behind the LSMeans. ❝ You don't need a mixed model when you have only one sigma in play (this isn't a replicated study I presume?). I know the Silly-O-Meter! In PHX/WNL everything goes the REML-way. The only way to mimick the behaviour of SAS Proc GLM is to specify all effects fixed, and filter incomplete data beforehand. Here this is not an issue, of course. ❝ In the simple non-replicated case fitting a mixed model with subject as random should give the same result as the normal linear model based on all fixed. Yes. ❝ If there are subtle differences at some decimal then this sounds most likely just like either a rounding phenomenon, or a convergence issue where somehow the optimiser in this case is capable of finding smaller sigma when the mixed model is applied. Yep – though the setup (convergence criteria, step size, ![]() ❝ The normal linear model can be solved exactly with e.g. R at least to the extent we can rely on its numerical stability for inversion of XtX; I would take a look at sigma that way and see what the truth I’m try to dig out some code from the grave. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
ElMaestro ★★★ Denmark, 2012-10-27 00:05 (4557 d 22:01 ago) @ Helmut Posting: # 9465 Views: 11,268 |
|
Hi Helmut, check your coding, I thik there's an issue with seq. I get:
Subj=as.factor(c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10, We have a winner? PS: With that coding for subject we will of course not talk about subject nested in sequence or stage ![]() ![]() ![]() M=lm(log(PK)~0+Trt+Stg+Seq+Subj+Per%in%Stg) — Pass or fail! ElMaestro |
d_labes ★★★ Berlin, Germany, 2012-10-29 10:57 (4555 d 10:08 ago) @ Helmut Posting: # 9479 Views: 11,211 |
|
Dear Helmut! Here the sasophylistic answer (to what question ever): Used code: title "Long form analysis after stage 2"; As we know meanwhile the random statement doesn't change the "all fixed effects" solution of Proc GLM. Output (only interested parts): ... Attention! Must had change the sign (swap upper, lower) in the log domain since R-T is calculated due to lexical order of treatments coded as R and T. Remark for the nitpickers and silly-o-meter inventors: Within SAS you must use the subject effect nested within sequence and stage, even if the subjects are coded unique. Otherwise you don't obtain a type III ANOVA and no LSMeans. — Regards, Detlew |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2012-11-06 02:43 (4547 d 18:23 ago) @ d_labes Posting: # 9505 Views: 11,204 |
|
Dear Detlew, ElMaestro, Jiří, and all, Linda Hughes of Pharsight clarified the setup. Actually
Sequence+Stage+Period(Stage)+Treatment+Sequence*Stage+Subject(Sequence*Stage) Now I get the same results (PE, CI, Means, SEs, ![]() — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
ElMaestro ★★★ Denmark, 2012-11-06 12:48 (4547 d 08:17 ago) @ Helmut Posting: # 9507 Views: 11,039 |
|
Dear Helmut, ❝ ❝ ❝ Now I get the same results (PE, CI, Means, SEs, Looks like this would kick the the silly-o-meter directly into a cosmic overdrive. I would intuitively say you should get the same results if you remove the Sequence (first) term. Can check? By the way: If models need to be written anything like that then I would guess period would need to be specified as period(sequence) in the standard 2,2,2-BE model. Just trying to follow the logic that I don't understand. Nicht? — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2012-11-06 14:48 (4547 d 06:17 ago) @ ElMaestro Posting: # 9512 Views: 10,965 |
|
Hi ElMaestro! ❝ ❝ ❝ ❝ […] Don’t run the silly-o-meter on this setup. ❝ ❝ Looks like this would kick the the silly-o-meter directly into a cosmic overdrive. Definitely. ❝ I would intuitively say you should get the same results if you remove the Sequence (first) term. Can check? Correct. ❝ By the way: If models need to be written anything like that then I would guess period would need to be specified as period(sequence) in the standard 2,2,2-BE model. Just trying to follow the logic that I don't understand. Nicht? Nö (God moves in mysterious ways). Sequence+Treatment+Period+Subject(Sequence) works, whereas Sequence+Treatment+Period(Sequence)+Subject(Sequence) does not. In the magic BE-wizard LSMeans “not estimable” – end of story.— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
ElMaestro ★★★ Denmark, 2012-11-06 16:27 (4547 d 04:39 ago) @ Helmut Posting: # 9514 Views: 11,012 |
|
Hi Helmut, ❝ Nö (God moves in mysterious ways). Excellent ![]() Period%in%Sequence syntactically works in R (like Sequence%in%Period , haha), although it makes no difference. Thanks for the test.— Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2012-11-06 18:06 (4547 d 03:00 ago) @ ElMaestro Posting: # 9515 Views: 10,983 |
|
Hi ElMaestro! ❝ […] it doesn't work, but it isn't clear why the logic doesn't or shouldn't apply to this case. Yep. ❝ Next time I talk to someone from Pharsight I will ask if this is a bug or a feature, or if I can somehow progress to the next level of cosmic insight into the logic behind. Software developers will always tell you that’s a feature, although: If debugging is the process of removing bugs, — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |