BookmarkSubscribeRSS Feed
DaLack
Calcite | Level 5

I want to estimate a univariate Gaussian mixture model with two components using proc fmm in SAS 9.3. I tried to give some hints by means of the option partial. I have already checked the following post http://blogs.sas.com/content/iml/2011/10/21/the-power-of-finite-mixture-models.html. But in my case, SAS seems to ignore my hint. I assigned two extreme observations to different groups. But after running the procedure they are in the same cluster shown by the created variable "Predicted Component".

My code is the following:

 

* Giving a hint

data lib.ex;
set ex;
Note = . ;
if ... then Note=2;
if ... then Note=1;
run;

* Implementing the hint

proc fmm data=lib.ex partial=Note;
model lny = / k=2;
output out=lib.ex_n class=comp;
run;

 

I don't get any error messages in my log file.

 

Thanks in advance.

4 REPLIES 4
Rick_SAS
SAS Super FREQ

Try

proc fmm data=lib.ex partial=Note;
CLASS Note;
model lny = / k=2;
run;

 

 

As shown in the blog post, small data sets might lead to this problem, especially if the component centers are close to each other. How many observations do you think you have in each component? How far apart are the centers of the components in terms of the largest standard deviation?

 

You can also try specifying initial guesses for the parameters.  For example, if you think the first component is N(0,1) and the second is N(2, 3) then you can specify

PARMS(0 1, 2 3);

DaLack
Calcite | Level 5

Thanks for your answer.

I have a really huge data set and therefore enough observations in each component. The differences between the centers are quite large, I think around 5 times the largest standard deviation.

PGStats
Opal | Level 21

partial= option mostly serves to label mixture components, because the procedure cannot assume that assigned observations are representative of their component.

 

Try using model statement options / kmin=2 equate=scale; Together with the parms() option these should bring you close to the desired components. 

PG
DaLack
Calcite | Level 5

But how can I label mixture components, if the partial option is somehow ignored and the predicted components aren't coincident with my given component membership?

Thanks for your help.

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 4 replies
  • 1445 views
  • 2 likes
  • 3 in conversation