BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
jl4443
Fluorite | Level 6

Hello,

 

I am running a simulation study using PROC FMM for a two-component mixture model. When I compare the parameter estimates to the underlying simulated values, I want to ensure that what is called "Component 1" in one iteration of the simulation is consistent with "Component 1" across other iterations of the simulation (e.g., Component 1 is always the mixture with a larger intercept), so that components are comparable across iterations.


I have reviewed the documentation for the RESTRICT statement, and see that it says it can be used "to impose order conditions on the parameters in a model" but I can't quite figure out how to implement this. The current code to implement my mixture model using PROC FMM is shown below. I appreciate any suggestions for ordering the components. Thank you. 

 

 

proc fmm data=sim55.scenario55_sim_data_events;
	where iteration = 1;
	model log_outc_yrs = age_dx_centered / cl dist=normal k = 2 equate=scale;
	probmodel pdl1_perc_norm / noint cl;
	weight iptw_ipcw_trim97;
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

If I understand your question, I believe you are referring to a phenomenon known as "label switching." The FMM documentation for the PARTIAL= option  states:

In a model in which label switching is a problem, you can sometimes avoid switching by assigning
just a few observations to categories. For example, in a three-component model, switching might be
prevented if you assign the observation that has the smallest response value to the first component and
the observation that has the largest response value to the last component.

 

Alternatively, you can try to post-process the labels by looking at the ParameterEstimates table. If the Intercept1 term is greater than the Intercept2 term, then switch the labels for the parameters and for the mixing probability.

 

I don't think you want to use the RESTRICT statement. That will impose constraints on the parameters for the first and second components, but it does not affect which components are assigned as first and second.

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

If I understand your question, I believe you are referring to a phenomenon known as "label switching." The FMM documentation for the PARTIAL= option  states:

In a model in which label switching is a problem, you can sometimes avoid switching by assigning
just a few observations to categories. For example, in a three-component model, switching might be
prevented if you assign the observation that has the smallest response value to the first component and
the observation that has the largest response value to the last component.

 

Alternatively, you can try to post-process the labels by looking at the ParameterEstimates table. If the Intercept1 term is greater than the Intercept2 term, then switch the labels for the parameters and for the mixing probability.

 

I don't think you want to use the RESTRICT statement. That will impose constraints on the parameters for the first and second components, but it does not affect which components are assigned as first and second.

jl4443
Fluorite | Level 6

This is helpful, thanks! In my case, I think the easiest way to go will be to adjust the components after running the model in a post-processing step. I appreciate your response. 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 420 views
  • 1 like
  • 2 in conversation