<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAS PROC FMM PROBMODEL Output in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-PROC-FMM-PROBMODEL-Output/m-p/933615#M46555</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to reconcile different parts of the output for PROC FMM with a PROBMODEL statement. Looking specifically at Table 43.12 in the example from the SAS documentation &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_fmm_examples01.htm" target="_self"&gt;here&lt;/A&gt;, I understand that looking at the mixing probabilities table is showing the probabilities on the logit scale, which can then be converted to probabilities of belonging to component 1 (the mu-hats shown on the table). However, If I include an OUTPUT statement and look at the values PRED_1 and PRED_2 for the values of the covariates shown on the table, they don't seem to align. I may be missing something, but I couldn't find documentation on PRED_1 - PRED_2 that would explain the difference, so I appreciate any suggestions!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Part two of this question is whether there is a way to obtain the odds ratios for the covariates in the mixture model, in the case that there are two components. I can back into it once the above is addressed and I am sure I am looking at the right values for the probabilities, but was curious if there is a more direct way to get this output from PROC FMM. Thanks again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data ossi;
   length tx $8;
   input tx$ n @@;
   do i=1 to n;
      input y m @@;
      output;
   end;
   drop i;
   datalines;
Control  18 8 8 9  9  7  9 0  5 3  3 5 8 9 10 5 8 5 8 1 6 0 5
            8 8 9 10  5  5 4  7 9 10 6 6 3  5
Control  17 8 9 7 10 10 10 1  6 6  6 1 9 8  9 6 7 5 5 7 9
            2 5 5  6  2  8 1  8 0  2 7 8 5  7
PHT      19 1 9 4  9  3  7 4  7 0  7 0 4 1  8 1 7 2 7 2 8 1 7
            0 2 3 10  3  7 2  7 0  8 0 8 1 10 1 1
TCPO     16 0 5 7 10  4  4 8 11 6 10 6 9 3  4 2 8 0 6 0 9
            3 6 2  9  7  9 1 10 8  8 6 9
PHT+TCPO 11 2 2 0  7  1  8 7  8 0 10 0 4 0  6 0 7 6 6 1 6 1 7
;

data ossi;
   set ossi;
   array xx{3} x1-x3;
   do i=1 to 3; xx{i}=0; end;
   pht  = 0;
   tcpo = 0;
   if (tx='TCPO') then do;
      xx{1} = 1;
      tcpo  = 100;
   end; else if (tx='PHT') then do;
      xx{2} = 1;
      pht   = 60;
   end; else if (tx='PHT+TCPO') then do;
      pht  = 60;
      tcpo = 100;
      xx{1} = 1; xx{2} = 1; xx{3}=1;
   end;
run;

proc fmm data=ossi;
   class pht tcpo;
   model y/m = / dist=binomcluster;
   probmodel pht tcpo pht*tcpo;
   output out = chk(keep = pht tcpo pred_:) pred(components);
run;

proc sort data = chk nodupkey; by pht tcpo; run;

proc print data = chk;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2024 22:30:02 GMT</pubDate>
    <dc:creator>jl4443</dc:creator>
    <dc:date>2024-06-24T22:30:02Z</dc:date>
    <item>
      <title>SAS PROC FMM PROBMODEL Output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-PROC-FMM-PROBMODEL-Output/m-p/933615#M46555</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to reconcile different parts of the output for PROC FMM with a PROBMODEL statement. Looking specifically at Table 43.12 in the example from the SAS documentation &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_fmm_examples01.htm" target="_self"&gt;here&lt;/A&gt;, I understand that looking at the mixing probabilities table is showing the probabilities on the logit scale, which can then be converted to probabilities of belonging to component 1 (the mu-hats shown on the table). However, If I include an OUTPUT statement and look at the values PRED_1 and PRED_2 for the values of the covariates shown on the table, they don't seem to align. I may be missing something, but I couldn't find documentation on PRED_1 - PRED_2 that would explain the difference, so I appreciate any suggestions!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Part two of this question is whether there is a way to obtain the odds ratios for the covariates in the mixture model, in the case that there are two components. I can back into it once the above is addressed and I am sure I am looking at the right values for the probabilities, but was curious if there is a more direct way to get this output from PROC FMM. Thanks again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data ossi;
   length tx $8;
   input tx$ n @@;
   do i=1 to n;
      input y m @@;
      output;
   end;
   drop i;
   datalines;
Control  18 8 8 9  9  7  9 0  5 3  3 5 8 9 10 5 8 5 8 1 6 0 5
            8 8 9 10  5  5 4  7 9 10 6 6 3  5
Control  17 8 9 7 10 10 10 1  6 6  6 1 9 8  9 6 7 5 5 7 9
            2 5 5  6  2  8 1  8 0  2 7 8 5  7
PHT      19 1 9 4  9  3  7 4  7 0  7 0 4 1  8 1 7 2 7 2 8 1 7
            0 2 3 10  3  7 2  7 0  8 0 8 1 10 1 1
TCPO     16 0 5 7 10  4  4 8 11 6 10 6 9 3  4 2 8 0 6 0 9
            3 6 2  9  7  9 1 10 8  8 6 9
PHT+TCPO 11 2 2 0  7  1  8 7  8 0 10 0 4 0  6 0 7 6 6 1 6 1 7
;

data ossi;
   set ossi;
   array xx{3} x1-x3;
   do i=1 to 3; xx{i}=0; end;
   pht  = 0;
   tcpo = 0;
   if (tx='TCPO') then do;
      xx{1} = 1;
      tcpo  = 100;
   end; else if (tx='PHT') then do;
      xx{2} = 1;
      pht   = 60;
   end; else if (tx='PHT+TCPO') then do;
      pht  = 60;
      tcpo = 100;
      xx{1} = 1; xx{2} = 1; xx{3}=1;
   end;
run;

proc fmm data=ossi;
   class pht tcpo;
   model y/m = / dist=binomcluster;
   probmodel pht tcpo pht*tcpo;
   output out = chk(keep = pht tcpo pred_:) pred(components);
run;

proc sort data = chk nodupkey; by pht tcpo; run;

proc print data = chk;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 22:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-PROC-FMM-PROBMODEL-Output/m-p/933615#M46555</guid>
      <dc:creator>jl4443</dc:creator>
      <dc:date>2024-06-24T22:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS PROC FMM PROBMODEL Output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-PROC-FMM-PROBMODEL-Output/m-p/933811#M46564</link>
      <description>&lt;P&gt;I think you are on the right track with that documentation link, I would recommend you re-read that example very closely. To summarize what is in the documentation, the binomial cluster model you are fitting is a two-component mixture, where the first component is binomial with 'n' trials and success probability 'mu_star + mu', the second component is binomial with 'n' trials and success probability 'mu_star', and the mixing probabilities are represented by pi and (1 - pi). Furthermore, mu_star = (1 - mu)*pi (where pi is still the mixing probability).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They show in the linked example that the estimate for the mu parameter, 'mu_hat', is computed as the inverse link of the intercept parameter in the model for mu (specified via the model statement). In the documentation example, mu_hat is equal to 0.5831. Likewise, in Table 43.11, they show how to compute estimates for the mixing parameter ('pi_hat') based on the coefficients from the model specified in the probmodel statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe that the pred statement for this model is generating the success probabilities for each of the two components of the mixture model, i.e., pred1 is mu_star_hat + mu_hat, and pred2 is mu_star hat. So, for example, for PHT = 0 and TCPO = 0, pi_hat = 0.6546, therefore mu_star_hat is (1 - 0.5831)*0.6546 = 0.273 (rounded), and&amp;nbsp;mu_star_hat + mu_hat = 0.5831 +&amp;nbsp;0.273 = 0.865. Those are the values of pred_2 and pred_1 that I get, respectively, when&amp;nbsp;PHT = 0 and TCPO = 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 15:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-PROC-FMM-PROBMODEL-Output/m-p/933811#M46564</guid>
      <dc:creator>Mike_N</dc:creator>
      <dc:date>2024-06-26T15:40:30Z</dc:date>
    </item>
  </channel>
</rss>

