mittyri ★★ Russia, 2015-04-14 10:35 (3664 d 15:05 ago) Posting: # 14681 Views: 31,829 |
![]() |
Dear Yung-jin, Helmut and all, Could you please guide me, I cannot reproduce the results from Bear demo sheet (SingleRep - full replicate design) in Phoenix. I used the WNL reference template published on this forum. For Bear the results are (lnCmax only for sake of brevity): **************** Classical (Shortest) 90% C.I. for lnCmax **************** For Phoenix: Source Ratio_%Ref_ CI_90_Lower CI_90_Upper Exploring the dataset I've found that the sequences aren't common RTRT/TRTR, but RTTR/TRRT. Is it important for calculations? Edit: Category changed. [Helmut] — Kind regards, Mittyri |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-14 16:07 (3664 d 09:33 ago) @ mittyri Posting: # 14683 Views: 30,082 |
|
Hi Mittyri, good news: I could reproduce you results in bear v2.6.4 (on R v3.1.3 64bit) and Phoenix/WinNonlin v6.4 64bit. ❝ Exploring the dataset I've found that the sequences aren't common RTRT/TRTR, but RTTR/TRRT. Is it important for calculations? In the Phoenix-templates, no. Personally I always code sequences for clarity. In this case RTTR instead of 1 and TRRT instead of 2. Bad news: Something seems to be strange in bear. Phoenix reports for the log-transformed means: Least squares means … with an estimated difference of 0.0637395 and SE 0.0475893. In bear: MEAN-ref = 7.3261 9.5346 – 7.3261 = 0.06374‽ ![]() If I calculate adjusted means manually … R = (RRTTR+RTRRT)/2 = (7.35801+7.29827)/2 = 7.32814 … confirming Phoenix’ results. How the standard errors are calculated is beyond me. Manually (by √s²/n) I get 0.039174 (R), 0.032647 (T), and 0.048889 (T–R). Same if I send BE Method C log | Ratios Test=T to descriptive statistics in PHX.PS: I you want to give it a try in your preferred software, the dataset: subject treatment sequence period Cmax The dataset looks artificial to me – in most cases exactly ±10 in the respective periods… — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
mittyri ★★ Russia, 2015-04-14 22:43 (3664 d 02:57 ago) @ Helmut Posting: # 14688 Views: 29,717 |
|
Guten Abend! ❝ Bad news: Something seems to be strange in bear. I'm a little bit surprised. No validation was performed for replicate design? I've found the validation report only for 2X2X2 crossover (dated 2009) I know that some companies use Bear for BE estimation during the registration procedure. No statistical validation after installation? ❝ The dataset looks artificial to me – in most cases exactly ±10 in the respective periods… The author of the package mentioned that these demo sets aren't artificial — Kind regards, Mittyri |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-15 04:17 (3663 d 21:23 ago) @ mittyri Posting: # 14689 Views: 29,732 |
|
Доброе Утро! ❝ No validation was performed for replicate design? Duno. ❝ I know that some companies use Bear for BE estimation during the registration procedure. No statistical validation after installation? To quote myself: “The ultimate responsibility [for the validation] in a controlled environ- I tried EMA’s (full replicate) Data Set I in bear. I recoded DATA to Cmax and logDATA to lnCmax. Kept columns AUC0t, AUC0INF, lnAUC0t, and lnAUC0INF (set all cells to NA). The import seems to work. Observations: AUC0t, AUC0INF, lnAUC0t, and lnAUC0INF are converted to character variables with empty cells. I had to change the variable type to “numeric” in order to get the NAs back. However, after closing the data editor bear told me: <0 rows> (or 0-length row.names) I suspected issues with incomplete subjects. Deleted subjects 11, 20, 24, 31, 42, 67, 69, 71. Same error. I guess we have to wait until Yung-jin passes by. ![]() — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-20 12:13 (3658 d 13:27 ago) @ Helmut Posting: # 14712 Views: 27,960 |
|
Dear Helmut, Finally, I don't think so. See the the following: ❝ ...the dataset: ❝ ❝ 1 T TRRT 1 1633 ❝ 1 R TRRT 2 1739 ❝ 1 R TRRT 3 ❝ 1 T TRRT 4 ❝ 2 R RTTR 1 1481 ❝ 2 T RTTR 2 1837 ❝ 2 T RTTR 3 1847 ❝ 2 R RTTR 4 1461 ❝ 3 T TRRT 1 2073 ❝ 3 R TRRT 2 1780 ❝ 3 R TRRT 3 ❝ 3 T TRRT 4 ❝ 4 R RTTR 1 1374 ❝ 4 T RTTR 2 1629 ❝ 4 T RTTR 3 1619 ❝ 4 R RTTR 4 ❝ 5 T TRRT 1 1385 ❝ 5 R TRRT 2 1555 ❝ 5 R TRRT 3 1545 ❝ 5 T TRRT 4 1386 ❝ 6 R RTTR 1 1756 ❝ 6 T RTTR 2 1522 ❝ 6 T RTTR 3 1512 ❝ 6 R RTTR 4 1746 ❝ 7 T TRRT 1 1643 ❝ 7 R TRRT 2 1566 ❝ 7 R TRRT 3 ❝ 7 T TRRT 4 1653 ❝ 8 R RTTR 1 1939 ❝ 8 T RTTR 2 1615 ❝ 8 T RTTR 3 ❝ 8 R RTTR 4 1949 ❝ 9 T TRRT 1 1759 ❝ 9 R TRRT 2 1475 ❝ 9 R TRRT 3 ❝ 9 T TRRT 4 1769 ❝ 10 R RTTR 1 1388 ❝ 10 T RTTR 2 1483 ❝ 10 T RTTR 3 ❝ 10 R RTTR 4 ❝ 11 T TRRT 1 1682 ❝ 11 R TRRT 2 1127 ❝ 11 R TRRT 3 ❝ 11 T TRRT 4 1692 ❝ 12 R RTTR 1 1542 ❝ 12 T RTTR 2 1247 ❝ 12 T RTTR 3 ❝ 12 R RTTR 4 ❝ 13 T TRRT 1 1605 ❝ 13 R TRRT 2 1235 ❝ 13 R TRRT 3 ❝ 13 T TRRT 4 1615 ❝ 14 R RTTR 1 1598 ❝ 14 T RTTR 2 1718 ❝ 14 T RTTR 3 ❝ 14 R RTTR 4 [edited] I think that the output dataset (SingleRep_stat_demo.csv as your original one) is not consistent with what it really used to run the demo. My mistake again. Very sorry about that. ![]() — 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 |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-15 11:38 (3663 d 14:02 ago) @ mittyri Posting: # 14691 Views: 29,727 |
|
Dear mittyri and Helmut, Thanks for reporting the errors of bear. Please allow me to quickly respond all your questions first.
— 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 |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-17 03:21 (3661 d 22:19 ago) (edited on 2015-04-17 12:53) @ mittyri Posting: # 14693 Views: 29,361 |
|
Dear mittyri and Helmut, I would like to respond all questions in this thread.
— 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 |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-17 16:25 (3661 d 09:15 ago) @ yjlee168 Posting: # 14694 Views: 29,351 |
|
Dear Yung-jin, ❝ … SAS (PROC MIXED) or WNL (same as SAS?) … PHX/WNL uses a mixed-effects model with REML. In Proc Mixed you can get ML as well. ❝ • […] The correct one should be ❝ ❝ ❝ ❝ ❝ ❝ ❝ Hhm. I got R 7.32814, T 7.39188, PE 0.0637395 (PHX + manual) and SE 0.0475893 (PHX). Both bear’s R and T are shifted –0.03% compared to PHX/manual. Seems that the PE is correct, but how is it calculated from the means? IMHO 7.39 – 7.326071 = 0.063929 ≠ 0.06373952. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-17 20:50 (3661 d 04:50 ago) (edited on 2015-04-17 21:48) @ Helmut Posting: # 14695 Views: 29,358 |
|
Dear Helmut, Estimate(test-ref) here is obtained from lme() (red color number), Statistical analysis (lme) - replicate BE study Point estimate is calculated from 100*eEstimate(test-ref). The means are calculated directly from dataset. Fdata<-split(TotalData, list(TotalData$drug)) [edited] do we use the same dataset?: confused: — 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 |
ElMaestro ★★★ Denmark, 2015-04-18 01:14 (3661 d 00:26 ago) @ yjlee168 Posting: # 14696 Views: 29,188 |
|
Hi yung-jin (and Helmut a bit), I have no certain idea about what's going on there but: ❝ Fixed effects: log(Cmax) ~ seq + prd + drug
— Pass or fail! ElMaestro |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-18 13:12 (3660 d 12:28 ago) @ ElMaestro Posting: # 14697 Views: 29,164 |
|
Dear Elmaestro, ❝ 1. Could you try and fit fixed effects as OK. add an intercept? Statistical analysis (lme) - replicate BE study Looks like the same. ❝ 2. Could you compare and check the presence and handling of na's in your comparisons?
— 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 |
ElMaestro ★★★ Denmark, 2015-04-18 13:28 (3660 d 12:12 ago) @ yjlee168 Posting: # 14698 Views: 29,066 |
|
Hi yung-jin, ❝ ❝ 1. Could you try and fit fixed effects as ❝ ❝ OK. add an intercept? No, take away an intercept. ❝ Fixed effects: log(Cmax) ~ 0 + seq + prd + drug In a sense this isn't what I suggested. Please try and fit it with drug specified as the first effect. In stead of log(Cmax) ~ 0 + seq + prd + drug see if you can make sure it somehow fits log(Cmax) ~ 0 + drug + prd + seq or equally good log(Cmax) ~ 0 + drug + seq + prd order of effects has lexical importance and determines how many effect estimates you get per term. Accordingly, when you fit sequence as the first term you will not see one effect estimate for each drug. Good luck and sorry if my initial suggestion was not too well described. — Pass or fail! ElMaestro |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-18 14:02 (3660 d 11:38 ago) @ ElMaestro Posting: # 14699 Views: 29,196 |
|
Dear ElMaestro, ❝ No, take away an intercept. I see. ❝ or equally good ❝ Statistical analysis (lme) - replicate BE study ❝ order of effects has lexical importance and determines how many effect estimates you get per term. Accordingly, when you fit sequence as the first term you will not see one effect estimate for each drug. Aha! Now I remember that. Thank you so much to refresh my memory. But now I don't know which one I should extract. ![]() — 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 |
ElMaestro ★★★ Denmark, 2015-04-18 15:42 (3660 d 09:58 ago) @ yjlee168 Posting: # 14701 Views: 29,105 |
|
Hi yung-jin, ❝ ❝ ❝ ❝ ❝ ❝ Aha! Now I remember that. Thank you so much to refresh my memory. But now I don't know which one I should extract. Drug diff. = 7.420013-7.356274 = about 0.06374. Perhaps we should turn to contrast coding to find out why Helmut's effect don't match. As long as the drug difference is good there is no genuine problem, right? — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-18 16:08 (3660 d 09:32 ago) @ ElMaestro Posting: # 14702 Views: 29,068 |
|
Hi ELMaestro, ❝ As long as the drug difference is good there is no genuine problem, right? For BE, yes. But do you think that assessors (re-calculating studies) would love to see treatment means differing to other results (software, pocket-calculator, paper/pencil/brain)? — 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, 2015-04-18 18:01 (3660 d 07:39 ago) @ Helmut Posting: # 14703 Views: 29,181 |
|
Good afternoon Helmut, ❝ But do you think that assessors (re-calculating studies) would love to see treatment means differing to other results (software, pocket-calculator, paper/pencil/brain)? In all likelihood not. "If it doesn't match SAS then it must be wrong", right? I must read up on the c.c. matter when I have got the time. By the way I wonder if "LS Means" have any meaningful interpretation for mixed models when we are not working with least squares minimisation?? I can't say the definition of LS Means that I have seen in e.g. the SAS help files are particularly helpful to me. Perhaps this is just due to my walnut-sized brain that gives up too quickly... — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-19 02:59 (3659 d 22:41 ago) @ ElMaestro Posting: # 14705 Views: 28,915 |
|
Hi ElMaestro, ❝ "If it doesn't match SAS then it must be wrong", right? Didn’t say that. ![]() If we have a four-period, two-sequence replicate design, balanced, and complete data: marginal treatment means = adjusted means (SAS-lingo: LSMs). ❝ I must read up on the c.c. matter when I have got the time. By the way I wonder if "LS Means" have any meaningful interpretation for mixed models when we are not working with least squares minimisation?? Why the heck? IMHO, for this dataset all means should agree, regardless the model – which they do in Vienna (to 15 significant digits; not shown): R T So why do we get… bear 7.356274 7.420013 … which are ~3.8% higher for both treatments? No, I’m not satisfied if only the PE agrees – I expect to get a nasty surprise once we start to deal with unbalanced data. — 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, 2015-04-19 11:14 (3659 d 14:26 ago) @ Helmut Posting: # 14706 Views: 28,816 |
|
Hi Helmut, ❝ ❝ Method A (EMA, subjects fixed) 7.328141 7.391880 ❝ Method B (EMA, subjects random) 7.328141 7.391880 ❝ Method C (FDA = mixed efects) 7.328141 7.391880 ❝ Marginal means (Gnumeric) 7.328141 7.391880 ❝ So why do we get… ❝ ❝ … which are ~3.8% higher for both treatments? No, I’m not satisfied if only the PE agrees – I expect to get a nasty surprise once we start to deal with unbalanced data. You're right, it does look surprising. Can you ask Phoenix what the log likelihood was when it had identified the minimum and compare with Yung-jin's logLik above? And what about those DF's? — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-19 13:08 (3659 d 12:32 ago) @ ElMaestro Posting: # 14707 Views: 28,667 |
|
Hi ElMaestro, ❝ You're right, it does look surprising. Since Gnumeric is my (non-)pocket calculator (no modeling!) I concur that PHX’ results are the “correct” ones. ❝ Can you ask Phoenix what the log likelihood was when it had identified the minimum and compare with Yung-jin's logLik above? Maybe it’s better to look at the AIC (lower = better) AIC LL ❝ And what about those DF's? Identical. — 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, 2015-04-19 13:42 (3659 d 11:58 ago) @ Helmut Posting: # 14708 Views: 28,657 |
|
Good morning Helmut, ❝ Maybe it’s better to lok at the AIC (smaller = better) ❝ ❝ bear -174.2564 ❝ PHX Method A -29.0235 ❝ PHX Method B -54.8339 ❝ PHX Method C -190.0907 I'd prefer to compare the logarithmic likelihood to see which optimiser found the best peak, if they are not the same. The 1:1 comparison here is Method C vs. bear using lme. The above AICs would give the impression that bear did not find the optimum well; possibly something to do with the model specification, but I hope to see the log likelihood and the df's. From the posts above I'd say I am not completely sure the df's are equal all over the range, cf. the drug df's used for the t-statistics. — Pass or fail! ElMaestro |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-20 01:36 (3659 d 00:04 ago) @ Helmut Posting: # 14709 Views: 28,733 |
|
Dear Helmut and Elmaestro, I also tried some other methods. I used two R packages lsmeans and lmerTest to do analysis of mixed model first. if I used lmerTest (also required package pbkrtest), modlnCmax<-lmer(log(Cmax) ~ seq + prd + drug + (1|subj), data=TotalData, REML=TRUE) I got the results asLeast Squares Means table: If I used lsmeans package, I got drug lsmean SE df lower.CL upper.CL Original results from bear are summary Test Ref Ratio Both lsmeans and lmerTest only work with lmer(), not lme(). What do you think about these results? I'm ![]() Ref. link: detlew's The SAS way in Rrrr land ❝ ... ❝ ❝ Method A (EMA, subjects fixed) 7.328141 7.391880 ❝ Method B (EMA, subjects random) 7.328141 7.391880 ❝ Method C (FDA = mixed efects) 7.328141 7.391880 ❝ Marginal means (Gnumeric) 7.328141 7.391880 ❝ So why do we get… ❝ ❝ … which are ~3.8% higher for both treatments? No, I’m not satisfied if only the PE agrees – I expect to get a nasty surprise once we start to deal with unbalanced data. — 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 |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-20 03:28 (3658 d 22:12 ago) @ yjlee168 Posting: # 14711 Views: 28,298 |
|
Hi Yung-jin, funny – while you posted I experimented with lsmeans as well. Not so bad. ![]() ❝ lsmeans only work with lmer(), not lme(). That’s not correct – see help(models) !Hint: If in a replicate design evaluated by a mixed effects model the SEs of R and T are equal, likely something is wrong with the coding. I hijacked your RepMIX() and renamed to honor ElMaestro.# Change to directory containing "SingleRep_stat_demo.csv" first! Bingo for the means! The SEs are still off (compared to PHX). Level Estimate StdError DF At least something to start from. Post #500 this year. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-20 12:23 (3658 d 13:17 ago) @ Helmut Posting: # 14713 Views: 27,957 |
|
Dear Helmut, Yes, this message is great. ![]() ❝ That’s not correct – see Thanks. Got it. ❝ ... ❝ TotalData[, !(names(TotalData) %in% c("AUC0t", "AUC0INF", "lnCmax", ❝ "lnAUC0t","lnAUC0INF"))] ❝ muddle <- lme(log(Cmax) ~ drug+seq+prd, random = ~drug-1|subj, ❝ data=TotalData) I need one more line to run lsmeans here. muddle.rg1<-ref.grid(muddle,data=TotalData) ; otherwise, it would crash for no data. I don't know why.❝ lsmeans(muddle.rg1, "drug", cov.reduce=F, weights="equal") ❝ Bingo for the means! The SEs are still off (compared to PHX). ❝ ❝ T 7.391880 0.032656 12 ❝ At least something to start from. OK. ❝ Post #500 this year. Congratulations! ![]() — 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 |
ElMaestro ★★★ Denmark, 2015-04-20 12:35 (3658 d 13:05 ago) @ Helmut Posting: # 14714 Views: 28,079 |
|
Gentlemen, ❝ lsmeans(muddle, "drug", cov.reduce=F, weights="equal") ❝ ❝ drug lsmean SE df lower.CL upper.CL ❝ 1 7.328141 0.02504047 12 7.273582 7.382699 ❝ 2 7.391880 0.03485385 12 7.315940 7.467820 ❝ ❝ Results are averaged over the levels of: seq, prd ❝ Confidence level used: 0.95 Well, it seems you are finally getting there, although it really isn't pretty. I think all this is about treatment effects in perception must be Least Squares Means whatever that term truly means. I don't uncritically subscribe to that view. R actually got those treatment effects right but it did not report what was expected or hoped for by those who had a love affair with SAS' invention. Note that 'averaged over the levels' part. In a nutshell, this reminds me that one day I will add a package called 'marginal means' and it will do absolutely nothing except alias the lsmeans function to a function called marginal.means and suddenly everything will make a lot more sense. I will receive the Fields Medal for it. At least. Plus 17 Michelin Stars and the Golden Palms.— Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-20 16:34 (3658 d 09:06 ago) @ ElMaestro Posting: # 14715 Views: 28,356 |
|
Hi ElMaestro, ❝ […] those who had a love affair with SAS' invention. Statler & Waldorf-day today? ❝ […] one day I will add a package called 'marginal means' and it will do absolutely nothing except alias the Go ahead. I have to repeat myself: Here we are dealing with a balanced, replicated design and complete data. I’m not (!) dealing with any muddle. I’m averaging subjects’ responses for each treatment and later averaging the means. Try it in OO Calc …subj drug seq prd lnCmax meanR meanT R(1) R(2) T(1) T(2) … or: cnames <- c("subj", "drug", "seq", "prd", "Cmax", Here (‼) you could even ignore the entire data structure: R <- subset(Cmax, drug == 1) I’m not promoting SAS. ![]() bear – which must agree with the simple / marginal / however-you-like-to-name-them means in a balanced case first. Then we have to check what’s happening to unbalanced datasets.— 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, 2015-04-20 17:39 (3658 d 08:01 ago) @ Helmut Posting: # 14716 Views: 27,811 |
|
Hi Helmut, ❝ Statler & Waldorf-day today? Every day is a Statler & Waldorf day ![]() ![]() ❝ cnames <- c("subj", "drug", "seq", "prd", "Cmax", MeanR), ❝ (...) "\nT:", sprintf("%.6f", MeanT), "\n") Ohdearohgoodnessmelordhavemercy. Yuck. ![]() ❝ I’m not promoting SAS. Don't worry. I know that for a long time already. There is still something that really bothers me and that is the log Likelihood difference of R versus WNL. With REML I think optimisation switches back and forth be in terms of the estimates. You fiddle with the covariance matrix and read the logLikelihood. Then you fiddle with the fixed effects and read the logLikelihood. Then you fiddle with the covariance matrix, and so forth. Repeat until some convergence criterion is met. ML would only be plain and simple covariance matrix fiddling, I think (?). Thus I have a vague and completely unsubstantiated feeling this could possibly be fixed by proper inputs and that you'd then see agreement about the likelihoods and probably the treatment effects too. It is a guess, and undertunately I do not know my way around with R or mixed models to an extent where I can do it. — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-20 18:35 (3658 d 07:05 ago) @ ElMaestro Posting: # 14717 Views: 27,790 |
|
Hi ElMaestro, ❝ There is still something that really bothers me and that is the log Likelihood difference of R versus WNL. With REML I think optimisation switches back and forth be in terms of the estimates. […] Maybe, maybe not. PHX’ manual only tells me: The linear mixed effects model is: y = Xβ + Zγ + ε, Let θ be a vector consisting of the variance parameters in G and R. The full maximum likelihood procedure (ML) would simultaneously estimate both the fixed effects parameters β and the variance parameters θ by maximizing the likelihood of the observations y with respect to these parameters. In contrast, restricted maximum likelihood estimation (REML) maximizes a likelihood that is only a function of the variance parameters θ and the observations y, and not a function of the fixed effects parameters. Hence for models that do not contain any fixed effects, REML would be the same as ML. ❝ ML would only be plain and simple covariance matrix fiddling, I think (?). Well, we do have fixed effects, right? At least in PHX/WNL, only REML is implemented. IIRC, REML is recommended by Patterson/Jones somewhere. Thread closed. Please continue over there. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-20 01:44 (3658 d 23:56 ago) @ yjlee168 Posting: # 14710 Views: 29,090 |
|
Dear Elmaestro and Helmut, I like to correct what I have said about lme() with NA. We can use lme(..., na.action=na.exclude) if there are some NA in dataset. Looks like this option can avoid crash if we do not omit NA. Sounds great.❝ • any NA must be removed (as the entire period) first before doing lme(); otherwise, it will crash.[/list] So there is no way to compare the difference. — 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 |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2015-04-18 15:30 (3660 d 10:10 ago) @ yjlee168 Posting: # 14700 Views: 29,175 |
|
Dear Yung-jin, ❝ do we use the same dataset? I’m using bear’s SingleRep_stat_demo.csv (to confirm my numbers see above). I worked with the raw-data and made the log-transformation internally in full precision.In the dataset lnCmax is given with two decimal figures. If I use those I get R 7.3261, T 7.3900, PE 0.0639.Seems that there are also some rounding issues in part of the data: subj drug seq prd Cmax lnCmax round(log(Cmax), 2) … leading to R 7.3289, T 7.3918, PE 0.0629. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2015-04-19 01:14 (3660 d 00:26 ago) @ Helmut Posting: # 14704 Views: 29,003 |
|
Dear Helmut and Elmaestro, Thank you both so much, especially during the weekend. @Helmut - Agree. Some rounding errors may occur if started with the raw data. However, when doing lme(), I use lme(log(Cmax)~...) (the raw data) instead of lme(lnCmax~...). PE still comes very close. That is strange, too. ❝ I’m using bear’s @Elmaestro - Great. Got it. ❝ Drug diff. = 7.420013-7.356274 = about 0.06374. Have a nice weekend. — 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 |