a question about the mixture distribution

5 messages 3 people Latest: Nov 17, 2009

a question about the mixture distribution

From: wu Kehua Date: October 13, 2009 technical
Hi, I am a new NONMEM user. I have a question about mixture distribution. I have two parameters. How to apply mixture distribution on the both parameters? I should use the first one or the second one? *First,* $PRED IF (MIXNUM.EQ.2) THEN ALPH =THETA(1) END IF IF (MIXNUM.EQ.1) THEN ALPH = THETA(2) ENDIF IF (MIXNUM.EQ.3) THEN BASE=THETA(3) ELSE BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = 1-THETA(5) P(3)=THETA(6) P(4)=1-THETA6) NSPOP = 4 *Second,* IF (MIXNUM.EQ.1) THEN ALPH =THETA(1) BASE=THETA(3) END IF IF (MIXNUM.EQ.2) THEN ALPH = THETA(1) BASE=THETA(4) ENDIF IF (MIXNUM.EQ.3) THEN ALPH = THETA(2) BASE=THETA(3) ELSE ALPH = THETA(2) BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = THETA(6) P(3)=THETA(7) P(4)=1-THETA(5)-THETA(6)-THETA(7) NSPOP = 4 Thank you very much! Best regards, Kehua

RE: a question about the mixture distribution

From: Matt Fidler Date: October 13, 2009 technical
Kehua, Option 1 is definitely better. This states that there is a possibility that a population falls into ALPH1 or ALPH2. Within that same population there are two populations for BASE. The other option states that each person in the has distinct parameters that four populations fall into: ALPH - Pop1, ALPH - Pop 2, Base -Pop 1, or Base -Pop2. Therefore, if you selected ALPH - pop1, you wouldn't have the parameter base. (You require this by having P1 - P4 to add up to be one - the total probability). A third option you may consider is if you have reason to believe that the populations that have ALPH1 and Base1 are the same: $PRED IF (MIXNUM.EQ.2) THEN ALPH =THETA(1) ELSE ALPH = THETA(2) ENDIF IF (MIXNUM.EQ.2) THEN BASE=THETA(3) ELSE BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = 1-THETA(5) NSPOP = 2 I haven't run anything like Option 1, and am unsure if NONMEM supports two separate populations for ALPH and BASE. Has anyone tried this? Matt.
Quoted reply history
________________________________ From: owner-nmusers On Behalf Of wu kehua Sent: Tuesday, October 13, 2009 10:58 AM To: nmusers Subject: [NMusers] a question about the mixture distribution Hi, I am a new NONMEM user. I have a question about mixture distribution. I have two parameters. How to apply mixture distribution on the both parameters? I should use the first one or the second one? First, $PRED IF (MIXNUM.EQ.2) THEN ALPH =THETA(1) END IF IF (MIXNUM.EQ.1) THEN ALPH = THETA(2) ENDIF IF (MIXNUM.EQ.3) THEN BASE=THETA(3) ELSE BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = 1-THETA(5) P(3)=THETA(6) P(4)=1-THETA6) NSPOP = 4 Second, IF (MIXNUM.EQ.1) THEN ALPH =THETA(1) BASE=THETA(3) END IF IF (MIXNUM.EQ.2) THEN ALPH = THETA(1) BASE=THETA(4) ENDIF IF (MIXNUM.EQ.3) THEN ALPH = THETA(2) BASE=THETA(3) ELSE ALPH = THETA(2) BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = THETA(6) P(3)=THETA(7) P(4)=1-THETA(5)-THETA(6)-THETA(7) NSPOP = 4 Thank you very much! Best regards, Kehua This e-mail (including any attachments) is confidential and may be legally privileged. If you are not an intended recipient or an authorized representative of an intended recipient, you are prohibited from using, copying or distributing the information in this e-mail or its attachments. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete all copies of this message and any attachments. Thank you.

RE: a question about the mixture distribution

From: Matt Fidler Date: October 13, 2009 technical
Kehua, Option 1 is definitely better. This states that there is a possibility that a population falls into ALPH1 or ALPH2. Within that same population there are two populations for BASE. The other option states that each person in the has distinct parameters that four populations fall into: ALPH - Pop1, ALPH - Pop 2, Base -Pop 1, or Base -Pop2. Therefore, if you selected ALPH - pop1, you wouldn't have the parameter base. (You require this by having P1 - P4 to add up to be one - the total probability). A third option you may consider is if you have reason to believe that the populations that have ALPH1 and Base1 are the same: $PRED IF (MIXNUM.EQ.2) THEN ALPH =THETA(1) ELSE ALPH = THETA(2) ENDIF IF (MIXNUM.EQ.2) THEN BASE=THETA(3) ELSE BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = 1-THETA(5) NSPOP = 2 I haven't run anything like Option 1, and am unsure if NONMEM supports two separate populations for ALPH and BASE. Has anyone tried this? Matt.
Quoted reply history
________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of wu kehua Sent: Tuesday, October 13, 2009 10:58 AM To: [email protected] Subject: [NMusers] a question about the mixture distribution Hi, I am a new NONMEM user. I have a question about mixture distribution. I have two parameters. How to apply mixture distribution on the both parameters? I should use the first one or the second one? First, $PRED IF (MIXNUM.EQ.2) THEN ALPH =THETA(1) END IF IF (MIXNUM.EQ.1) THEN ALPH = THETA(2) ENDIF IF (MIXNUM.EQ.3) THEN BASE=THETA(3) ELSE BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = 1-THETA(5) P(3)=THETA(6) P(4)=1-THETA6) NSPOP = 4 Second, IF (MIXNUM.EQ.1) THEN ALPH =THETA(1) BASE=THETA(3) END IF IF (MIXNUM.EQ.2) THEN ALPH = THETA(1) BASE=THETA(4) ENDIF IF (MIXNUM.EQ.3) THEN ALPH = THETA(2) BASE=THETA(3) ELSE ALPH = THETA(2) BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = THETA(6) P(3)=THETA(7) P(4)=1-THETA(5)-THETA(6)-THETA(7) NSPOP = 4 Thank you very much! Best regards, Kehua This e-mail (including any attachments) is confidential and may be legally privileged. If you are not an intended recipient or an authorized representative of an intended recipient, you are prohibited from using, copying or distributing the information in this e-mail or its attachments. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete all copies of this message and any attachments. Thank you.

RE: a question about the mixture distribution

From: Joseph Standing Date: October 20, 2009 technical
Dear Kehua, We discussed your question in the Uppsala pharmacometrics meeting yesterday. If I understood your original question correctly, it was that there were two possible conditions for ALPHA and BASE, and that each combination was possible. A general principle for coding this: .. $MIX P(1) = Theta(alph) * Theta(Base) P(2) = (1 - Theta(alph)) * Theta(Base) P(3) = Theta(alph) * (1 - Theta(base)) P(4) = (1 - Theta(alph)) * (1-Theta(base)) ; = 1 - P(1) - P(2) - P(3) . $THETA (0,x,1) ; Theta(alph) $THETA (0,y,1) ; Theta(base) You should be able to extend this general principle to suit your specific case. Best wishes, Joe Standing _____
Quoted reply history
From: [email protected] [mailto:[email protected]] On Behalf Of Fidler,Matt,FORT WORTH,R&D Sent: den 13 oktober 2009 21:33 To: wu kehua Cc: [email protected] Subject: RE: [NMusers] a question about the mixture distribution Kehua, The number of subgroups depend on how you view the subgroups. There are three subgroups for ALPH, and there are two subgroups for BASE. Therefore, there could be 3*2 = 6 subgroups or 3+2 = 5 subgroups -- 3 for ALPH and 2 for BASE. While technically there are 6 groups, you only code for 5, and each of these five have sufficient information to determine which group each individual is a member of. Matt. _____ From: wu kehua [mailto:[email protected]] Sent: Tuesday, October 13, 2009 11:58 AM To: Fidler,Matt,FORT WORTH,R&D Cc: [email protected] Subject: Re: [NMusers] a question about the mixture distribution Hi Matt, Thank you very much for your kindly reply. It is very helpful. I still have another question about this issue. I have tried the first option. I applied three subgroups on ALPH and two subgroups on BASE. I think there should be six subgroups in total, right? But in the resulting data, there are just five subgroups. The code follows, $PRED CALLFL =1 EST = MIXEST IF (MIXNUM.EQ.3) THEN ALPH = (THETA(3)) END IF IF (MIXNUM.EQ.2) THEN ALPH = (THETA(2)) END IF IF (MIXNUM.EQ.1) THEN ALPH = (THETA(1)) ENDIF IF (MIXNUM.EQ.4) THEN BASE=THETA(4) ELSE BASE=THETA(5) END IF $MIX P(1) = THETA(6) P(2)=THETA(7) P(3) = 1-THETA(7)-THETA(6) P(4)=THETA(8) P(5)=1-THETA(8) NSPOP = 5 Sorry to bother you and thank you very much. I will try that one mentioned in your mail and let you know the results. I appreciate your helps. Best regards, Kehua 2009/10/13 Fidler,Matt,FORT WORTH,R&D <[email protected]> Kehua, Option 1 is definitely better. This states that there is a possibility that a population falls into ALPH1 or ALPH2. Within that same population there are two populations for BASE. The other option states that each person in the has distinct parameters that four populations fall into: ALPH - Pop1, ALPH - Pop 2, Base -Pop 1, or Base -Pop2. Therefore, if you selected ALPH - pop1, you wouldn't have the parameter base. (You require this by having P1 - P4 to add up to be one - the total probability). A third option you may consider is if you have reason to believe that the populations that have ALPH1 and Base1 are the same: $PRED IF (MIXNUM.EQ.2) THEN ALPH =THETA(1) ELSE ALPH = THETA(2) ENDIF IF (MIXNUM.EQ.2) THEN BASE=THETA(3) ELSE BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = 1-THETA(5) NSPOP = 2 I haven't run anything like Option 1, and am unsure if NONMEM supports two separate populations for ALPH and BASE. Has anyone tried this? Matt. _____ From: [email protected] [mailto:[email protected]] On Behalf Of wu kehua Sent: Tuesday, October 13, 2009 10:58 AM To: [email protected] Subject: [NMusers] a question about the mixture distribution Hi, I am a new NONMEM user. I have a question about mixture distribution. I have two parameters. How to apply mixture distribution on the both parameters? I should use the first one or the second one? First, $PRED IF (MIXNUM.EQ.2) THEN ALPH =THETA(1) END IF IF (MIXNUM.EQ.1) THEN ALPH = THETA(2) ENDIF IF (MIXNUM.EQ.3) THEN BASE=THETA(3) ELSE BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = 1-THETA(5) P(3)=THETA(6) P(4)=1-THETA6) NSPOP = 4 Second, IF (MIXNUM.EQ.1) THEN ALPH =THETA(1) BASE=THETA(3) END IF IF (MIXNUM.EQ.2) THEN ALPH = THETA(1) BASE=THETA(4) ENDIF IF (MIXNUM.EQ.3) THEN ALPH = THETA(2) BASE=THETA(3) ELSE ALPH = THETA(2) BASE=THETA(4) END IF $MIX P(1) = THETA(5) P(2) = THETA(6) P(3)=THETA(7) P(4)=1-THETA(5)-THETA(6)-THETA(7) NSPOP = 4 Thank you very much! Best regards, Kehua This e-mail (including any attachments) is confidential and may be legally privileged. If you are not an intended recipient or an authorized representative of an intended recipient, you are prohibited from using, copying or distributing the information in this e-mail or its attachments. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete all copies of this message and any attachments. Thank you. This e-mail (including any attachments) is confidential and may be legally privileged. If you are not an intended recipient or an authorized representative of an intended recipient, you are prohibited from using, copying or distributing the information in this e-mail or its attachments. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete all copies of this message and any attachments. Thank you.

Re: a question about the mixture distribution

From: wu Kehua Date: November 17, 2009 technical
Dear Joseph, Sorry for so delayed response. I build the model as your recommendations, and the model works very well. But there is another problem when the number of subgroups scales up to 12. PDx-pop shows a problem with my model: "332 $MIX: NSPOP OR INDEX I OF P(I) EXCEEDS CONSTANT "MMX" IN SIZES. " It seems that I should change the value of 'MMX'. I searched at the help files and did not find how to change it. I appreciate your and your colleagues' help. Best regards, Kehua
Quoted reply history
2009/10/20 Joseph Standing <[email protected]> > Dear Kehua, > > > > We discussed your question in the Uppsala pharmacometrics meeting > yesterday. If I understood your original question correctly, it was that > there were two possible conditions for ALPHA and BASE, and that each > combination was possible. A general principle for coding this: > > > > …. > > $MIX > > > > P(1) = Theta(alph) * Theta(Base) > > P(2) = (1 – Theta(alph)) * Theta(Base) > > P(3) = Theta(alph) * (1 - Theta(base)) > > P(4) = (1 – Theta(alph)) * (1-Theta(base)) ; = 1 – P(1) – P(2) – > P(3) > > > > … > > > > $THETA (0,x,1) ; Theta(alph) > > $THETA (0,y,1) ; Theta(base) > > > > > > You should be able to extend this general principle to suit your specific > case. > > Best wishes, > > > > Joe Standing > > > ------------------------------ > > *From:* [email protected] [mailto:[email protected]] > *On Behalf Of *Fidler,Matt,FORT WORTH,R&D > *Sent:* den 13 oktober 2009 21:33 > *To:* wu kehua > *Cc:* [email protected] > *Subject:* RE: [NMusers] a question about the mixture distribution > > > > Kehua, > > > > The number of subgroups depend on how you view the subgroups. > > > > There are three subgroups for ALPH, and there are two subgroups for BASE. > Therefore, there could be > > > > 3*2 = 6 subgroups > > > > or > > > > 3+2 = 5 subgroups -- 3 for ALPH and 2 for BASE. > > > > > > While technically there are 6 groups, you only code for 5, and each of > these five have sufficient information to determine which group each > individual is a member of. > > > > Matt. > > > > > ------------------------------ > > *From:* wu kehua [mailto:[email protected]] > *Sent:* Tuesday, October 13, 2009 11:58 AM > *To:* Fidler,Matt,FORT WORTH,R&D > *Cc:* [email protected] > *Subject:* Re: [NMusers] a question about the mixture distribution > > Hi Matt, > > Thank you very much for your kindly reply. It is very helpful. > > I still have another question about this issue. I have tried the first > option. I applied three subgroups on ALPH and two subgroups on BASE. I think > there should be six subgroups in total, right? But in the resulting data, > there are just five subgroups. The code follows, > > $PRED > > CALLFL =1 > EST = MIXEST > IF (MIXNUM.EQ.3) THEN > ALPH = (THETA(3)) > END IF > IF (MIXNUM.EQ.2) THEN > ALPH = (THETA(2)) > END IF > IF (MIXNUM.EQ.1) THEN > ALPH = (THETA(1)) > ENDIF > > > IF (MIXNUM.EQ.4) THEN > BASE=THETA(4) > ELSE > BASE=THETA(5) > END IF > > > > $MIX > > P(1) = THETA(6) > P(2)=THETA(7) > P(3) = 1-THETA(7)-THETA(6) > P(4)=THETA(8) > P(5)=1-THETA(8) > NSPOP = 5 > > Sorry to bother you and thank you very much. I will try that one mentioned > in your mail and let you know the results. > I appreciate your helps. > > Best regards, > > Kehua > > 2009/10/13 Fidler,Matt,FORT WORTH,R&D <[email protected]> > > Kehua, > > > > Option 1 is definitely better. This states that there is a possibility > that a population falls into ALPH1 or ALPH2. Within that same population > there are two populations for BASE. > > > > The other option states that each person in the has distinct parameters > that four populations fall into: ALPH - Pop1, ALPH - Pop 2, Base -Pop 1, or > Base -Pop2. Therefore, if you selected ALPH - pop1, you wouldn't have the > parameter base. (You require this by having P1 - P4 to add up to be one - > the total probability). > > > > A third option you may consider is if you have reason to believe that the > populations that have ALPH1 and Base1 are the same: > > > > $PRED > IF (MIXNUM.EQ.2) THEN > ALPH =THETA(1) > > ELSE > ALPH = THETA(2) > ENDIF > > IF (MIXNUM.EQ.2) THEN > > > BASE=THETA(3) > ELSE > BASE=THETA(4) > END IF > > $MIX > > P(1) = THETA(5) > P(2) = 1-THETA(5) > > NSPOP = 2 > > > > I haven't run anything like Option 1, and am unsure if NONMEM supports two > separate populations for ALPH and BASE. Has anyone tried this? > > > > Matt. > > > ------------------------------ > > *From:* [email protected] [mailto:[email protected]] > *On Behalf Of *wu kehua > *Sent:* Tuesday, October 13, 2009 10:58 AM > *To:* [email protected] > *Subject:* [NMusers] a question about the mixture distribution > > Hi, > > I am a new NONMEM user. I have a question about mixture distribution. > > I have two parameters. How to apply mixture distribution on the both > parameters? I should use the first one or the second one? > > *First,* > $PRED > IF (MIXNUM.EQ.2) THEN > ALPH =THETA(1) > END IF > IF (MIXNUM.EQ.1) THEN > ALPH = THETA(2) > ENDIF > > IF (MIXNUM.EQ.3) THEN > BASE=THETA(3) > ELSE > BASE=THETA(4) > END IF > > $MIX > > P(1) = THETA(5) > P(2) = 1-THETA(5) > P(3)=THETA(6) > P(4)=1-THETA6) > NSPOP = 4 > > > *Second,* > > IF (MIXNUM.EQ.1) THEN > ALPH =THETA(1) > BASE=THETA(3) > END IF > IF (MIXNUM.EQ.2) THEN > ALPH = THETA(1) > BASE=THETA(4) > ENDIF > IF (MIXNUM.EQ.3) THEN > ALPH = THETA(2) > BASE=THETA(3) > ELSE > ALPH = THETA(2) > BASE=THETA(4) > END IF > > $MIX > > P(1) = THETA(5) > P(2) = THETA(6) > P(3)=THETA(7) > P(4)=1-THETA(5)-THETA(6)-THETA(7) > NSPOP = 4 > > Thank you very much! > > Best regards, > > Kehua > > > This e-mail (including any attachments) is confidential and may be > legally privileged. If you are not an intended recipient or an authorized > representative of an intended recipient, you are prohibited from using, > copying or distributing the information in this e-mail or its attachments. > If you have received this e-mail in error, please notify the sender > immediately by return e-mail and delete all copies of this message and any > attachments. > > Thank you. > > > > This e-mail (including any attachments) is confidential and may be legally > privileged. If you are not an intended recipient or an authorized > representative of an intended recipient, you are prohibited from using, > copying or distributing the information in this e-mail or its attachments. > If you have received this e-mail in error, please notify the sender > immediately by return e-mail and delete all copies of this message and any > attachments. > > Thank you. >