BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
onechrister
Calcite | Level 5

Hi there,

 

I am trying to use PROC FMM to estimate mixing probabilities and distribution parameters for a mixture of, say, four distributions; which can be expressed as:

P = w1 * PDF1 + w2 * PDF2 + w3 * PDF3 + w4 * PDF4

-where w1, w2, w3 and w4 are the mixing probabilities and their sum is equal to 1;
-where I have estimates for the distribution parameters of PDF1 and PDF2; and
-where I have an estimate of the ratio between the mixing probabilities of PDF1 and PDF2 (e.g., w1/w2 = 2).

 

Is it possible to restrict the ratio between a subset of mixing probabilities when using PROC FMM?

(or when using another procedure?)

 

The distribution parameters for PDF1 and PDF2 can be fixed using the RESTRICT statement.

However, I have not been able to find a way to restrict the ratio between individual mixing probabilities.

 

Any advice how to troubleshoot this issue is greatly appreciated!

 

Just as an add-on:
I have an independent way to estimate the parameters and the relative mixing probabilities of PDF1 and PDF2.

This I do using a model where p = v1 * PDF1 + v2 * PDF2.

From hereon, I would like to restrict w1/w2 = v1/v2 and use the estimated PDF1 and PDF2 parameters in a final PROC FMM routine featuring all four distributions.

 

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

No, PROC FMM does not support constraints on the mixing parameters. The RESTRICT statement is for the regression parameters only.

 

To control the mixing parameters, PROC FMM supports the PROBMODEL statement, but that statement does not support constraints on the mixing parameters.

 

BTW, if the ratio pi1 / pi2 = 2, then pi1 - 2*pi2 = 0, so this is just a linear restriction on the parameters. 

 

I suppose it is possible to use PROC NLMIXED to maximize the likelihood of

Y = pi1*f1 + 2*pi1*f2 + pi3*f3 + pi4*f4,

which has only three mixing parameters.  But unfortunately it will be much more effort than the PROC FMM code that you are trying to use. 

View solution in original post

3 REPLIES 3
ballardw
Super User

For someone who knows more about this procedure it may help by posting the basic model (without your restrictions) so others can tell if the current options you are will allow/limit/prevent one or more pieces of your request.

 

It might not hurt to provide the information tables as well.

onechrister
Calcite | Level 5

Thank you for your reply!

 

The basic setup is as follows:

-I assume that PDF1 and PDF3 are Exponential distributions and that PDF2 and PDF4 are Normal distributions;

-I got a 'training' dataset to estimate the parameters of PDF1 and PDF2;

-These parameters are estimated using the following code:

proc fmm data=_12 ; /* training data */ 
  model p = / dist=normal k=1 parms(1 0.1); /* PDF2 */
  model + / dist=exponential k=1 parms(0.01); /* PDF1 */
  restrict int 1 (scale 0) > 0.05;
run; 

-From the output I extract the estimated distribution parameters for PDF1 and PDF2 (and I would like to use their estimated mixing probabilities in the next step);

-To estimate the parameters for PDF3 and PDF4 I next run the following code:

proc fmm data=_1234  ; 
  model P = / dist=normal k=1 parms(1 0.1); */ PDF2 */
  model + / dist=exponential k=1 parms(0.01); */ PDF1 */
  model + / dist=normal k=1 parms(1 0.01); */ PDF4 */
  model + / dist=exponential k=1 parms(0.01); */ PDF3 */
  restrict int 1 (scale 0) = 0.4968; 
  restrict int 0 (scale 1) = 0.002455 ;
  restrict int 0 (scale 0), int 1 (scale 0) = -1.8735;
*/ HERE I would like to also restrict the ratio between the mixing probabilities of PDF1 and PDF2 using the estimated values from the previous step */
run;

-I have attached the two datasets as .txt files.

 

 

 

 

 

 

 

Rick_SAS
SAS Super FREQ

No, PROC FMM does not support constraints on the mixing parameters. The RESTRICT statement is for the regression parameters only.

 

To control the mixing parameters, PROC FMM supports the PROBMODEL statement, but that statement does not support constraints on the mixing parameters.

 

BTW, if the ratio pi1 / pi2 = 2, then pi1 - 2*pi2 = 0, so this is just a linear restriction on the parameters. 

 

I suppose it is possible to use PROC NLMIXED to maximize the likelihood of

Y = pi1*f1 + 2*pi1*f2 + pi3*f3 + pi4*f4,

which has only three mixing parameters.  But unfortunately it will be much more effort than the PROC FMM code that you are trying to use. 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 512 views
  • 1 like
  • 3 in conversation