<?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 Multiple imputed computation of F-test with 2 or more df in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputed-computation-of-F-test-with-2-or-more-df/m-p/974659#M48896</link>
    <description>&lt;P&gt;I need help to combine (MIANALYZE) the data below.&amp;nbsp; Specifically, I need the pooled TRT*SUBGROUP interaction p-value.&lt;/P&gt;
&lt;PRE&gt;                                                                                                                                              Error
Obs    _Imputation_    Source              DF              SS              MS    EMS                                         ErrorTerm           DF     FValue     ProbF
  1          1         trt                  1      414.915078      414.915078    Var(Residual) + Q(trt,trt*subgroup)         MS(Residual)       294     115.30    &amp;lt;.0001
  2          1         subgroup             2      418.288785      209.144393    Var(Residual) + Q(subgroup,trt*subgroup)    MS(Residual)       294      58.12    &amp;lt;.0001
  3          1         trt*subgroup         2       21.702703       10.851351    Var(Residual) + Q(trt*subgroup)             MS(Residual)      &lt;FONT color="#0000FF"&gt; 294       3.02    0.0505&lt;/FONT&gt;
  4          1         Residual           294     1058.009621        3.598672    Var(Residual)                               .                    .        .       .    &lt;/PRE&gt;
&lt;P&gt;I have the solution and understand that for a 1 df test it would be the same as T-test.&amp;nbsp; I think MIANALYSE can pool the solution, but I don't know if I can compute the trt*subgroup test from the pooled solution.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Obs    _Imputation_    Effect            trt      subgroup    Estimate      StdErr      DF     tValue     Probt

  1          1         Intercept                               11.0516      0.2449     294      45.13    &amp;lt;.0001
  2          1         trt             Active                   2.3972      0.3817     294       6.28    &amp;lt;.0001
  3          1         trt             Placebo                       0           .       .        .       .    
  4          1         subgroup                     High        0.9031      0.3674     294       2.46    0.0145
  5          1         subgroup                     Low        -1.3336      0.3674     294      -3.63    0.0003
  6          1         subgroup                     Mid              0           .       .        .       .    
  7          1         trt*subgroup    Active       High        0.6155      0.5372     294       1.15    0.2528
  8          1         trt*subgroup    Active       Low        -0.7093      0.5423     294      -1.31    0.1919
  9          1         trt*subgroup    Active       Mid              0           .       .        .       .    
 10          1         trt*subgroup    Placebo      High             0           .       .        .       .    
 11          1         trt*subgroup    Placebo      Low              0           .       .        .       .    
 12          1         trt*subgroup    Placebo      Mid              0           .       .        .       .    &lt;/PRE&gt;
&lt;P&gt;This is my example data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
   value $trtfmt 'Placebo'='Placebo' 'Active'='Active';
   value $sgfmt  'Low'='Low' 'Mid'='Mid' 'High'='High';
   quit;

data ex;
  call streaminit(7);
  length trt $8 subgroup $8;
  do id=1 to 300;
    trt = ifc(rand('Bernoulli',0.5),'Active','Placebo');
    subgroup = scan('Low Mid High', rand('Table', 1/3,1/3,1/3));
    /* mean structure with true interaction: treatment benefit increases by subgroup */
    base = 10
         + (subgroup='Mid')*1
         + (subgroup='High')*2;
    tx   = (trt='Active')*( 1
         + (subgroup='Mid')*1
         + (subgroup='High')*2 );
    y = rand('Normal', base + tx, 2);
    if rand('Uniform') &amp;lt; 0.25 then y = .;  /* 25% missing */
    format trt $trtfmt. subgroup $sgfmt.;
    output;
  end;
run;
proc print data=ex; run;
proc mi data=ex out=ex_imp seed=31415 nimpute=3;
   class trt subgroup;
   fcs reg(y = trt subgroup trt*subgroup);
   var y trt subgroup;
   run;
ods exclude all;
ods output SolutionF=pe  CovB=covb type3=type3;
proc mixed data=ex_imp method=type3;
  by _imputation_;
  class trt subgroup;
  model y = trt subgroup trt*subgroup / covb solution ddfm=kr;
run;
ods trace off;
ods exclude none;


proc print data=pe(where=(_imputation_ eq 1)); run;
proc print data=covb(where=(_imputation_ eq 1)); run;
proc print data=type3(where=(_imputation_ eq 1)); run;
ods trace on;
proc mianalyze parms(classvar=full)=pe edf=294;* covb=covb;
   class trt subgroup;
   modeleffects Intercept trt subgroup trt*subgroup;
   ods output ParameterEstimates=int_p;
   run;
ods trace off;
proc print;       ;
   run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 09 Sep 2025 17:39:57 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2025-09-09T17:39:57Z</dc:date>
    <item>
      <title>Multiple imputed computation of F-test with 2 or more df</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputed-computation-of-F-test-with-2-or-more-df/m-p/974659#M48896</link>
      <description>&lt;P&gt;I need help to combine (MIANALYZE) the data below.&amp;nbsp; Specifically, I need the pooled TRT*SUBGROUP interaction p-value.&lt;/P&gt;
&lt;PRE&gt;                                                                                                                                              Error
Obs    _Imputation_    Source              DF              SS              MS    EMS                                         ErrorTerm           DF     FValue     ProbF
  1          1         trt                  1      414.915078      414.915078    Var(Residual) + Q(trt,trt*subgroup)         MS(Residual)       294     115.30    &amp;lt;.0001
  2          1         subgroup             2      418.288785      209.144393    Var(Residual) + Q(subgroup,trt*subgroup)    MS(Residual)       294      58.12    &amp;lt;.0001
  3          1         trt*subgroup         2       21.702703       10.851351    Var(Residual) + Q(trt*subgroup)             MS(Residual)      &lt;FONT color="#0000FF"&gt; 294       3.02    0.0505&lt;/FONT&gt;
  4          1         Residual           294     1058.009621        3.598672    Var(Residual)                               .                    .        .       .    &lt;/PRE&gt;
&lt;P&gt;I have the solution and understand that for a 1 df test it would be the same as T-test.&amp;nbsp; I think MIANALYSE can pool the solution, but I don't know if I can compute the trt*subgroup test from the pooled solution.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Obs    _Imputation_    Effect            trt      subgroup    Estimate      StdErr      DF     tValue     Probt

  1          1         Intercept                               11.0516      0.2449     294      45.13    &amp;lt;.0001
  2          1         trt             Active                   2.3972      0.3817     294       6.28    &amp;lt;.0001
  3          1         trt             Placebo                       0           .       .        .       .    
  4          1         subgroup                     High        0.9031      0.3674     294       2.46    0.0145
  5          1         subgroup                     Low        -1.3336      0.3674     294      -3.63    0.0003
  6          1         subgroup                     Mid              0           .       .        .       .    
  7          1         trt*subgroup    Active       High        0.6155      0.5372     294       1.15    0.2528
  8          1         trt*subgroup    Active       Low        -0.7093      0.5423     294      -1.31    0.1919
  9          1         trt*subgroup    Active       Mid              0           .       .        .       .    
 10          1         trt*subgroup    Placebo      High             0           .       .        .       .    
 11          1         trt*subgroup    Placebo      Low              0           .       .        .       .    
 12          1         trt*subgroup    Placebo      Mid              0           .       .        .       .    &lt;/PRE&gt;
&lt;P&gt;This is my example data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
   value $trtfmt 'Placebo'='Placebo' 'Active'='Active';
   value $sgfmt  'Low'='Low' 'Mid'='Mid' 'High'='High';
   quit;

data ex;
  call streaminit(7);
  length trt $8 subgroup $8;
  do id=1 to 300;
    trt = ifc(rand('Bernoulli',0.5),'Active','Placebo');
    subgroup = scan('Low Mid High', rand('Table', 1/3,1/3,1/3));
    /* mean structure with true interaction: treatment benefit increases by subgroup */
    base = 10
         + (subgroup='Mid')*1
         + (subgroup='High')*2;
    tx   = (trt='Active')*( 1
         + (subgroup='Mid')*1
         + (subgroup='High')*2 );
    y = rand('Normal', base + tx, 2);
    if rand('Uniform') &amp;lt; 0.25 then y = .;  /* 25% missing */
    format trt $trtfmt. subgroup $sgfmt.;
    output;
  end;
run;
proc print data=ex; run;
proc mi data=ex out=ex_imp seed=31415 nimpute=3;
   class trt subgroup;
   fcs reg(y = trt subgroup trt*subgroup);
   var y trt subgroup;
   run;
ods exclude all;
ods output SolutionF=pe  CovB=covb type3=type3;
proc mixed data=ex_imp method=type3;
  by _imputation_;
  class trt subgroup;
  model y = trt subgroup trt*subgroup / covb solution ddfm=kr;
run;
ods trace off;
ods exclude none;


proc print data=pe(where=(_imputation_ eq 1)); run;
proc print data=covb(where=(_imputation_ eq 1)); run;
proc print data=type3(where=(_imputation_ eq 1)); run;
ods trace on;
proc mianalyze parms(classvar=full)=pe edf=294;* covb=covb;
   class trt subgroup;
   modeleffects Intercept trt subgroup trt*subgroup;
   ods output ParameterEstimates=int_p;
   run;
ods trace off;
proc print;       ;
   run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Sep 2025 17:39:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputed-computation-of-F-test-with-2-or-more-df/m-p/974659#M48896</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2025-09-09T17:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple imputed computation of F-test with 2 or more df</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputed-computation-of-F-test-with-2-or-more-df/m-p/974665#M48897</link>
      <description>&lt;P&gt;MIANALYZE can only combine individual point estimates and cannot be used to combine F-tests specifically.&amp;nbsp; The theory itself is not very well-developed for combining multiple DF tests, especially Type 3 tests from MIXED, since&amp;nbsp;Rubin’s Rules apply directly to parameter estimates and their variances, not to F-statistics.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MIANALYZE does have a TEST statement and through the MULT option you can get a joint test based on the combined parameter estimates.&amp;nbsp; It does not allow these options with a CLASS statement, but you might be able to "trick" it into computing a type 3 hypothesis by dummy coding yourself and feeding those estimates into MIANALYZE.&amp;nbsp; Whether that is statistically valid or not however is not clear however.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2025 17:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputed-computation-of-F-test-with-2-or-more-df/m-p/974665#M48897</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2025-09-09T17:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple imputed computation of F-test with 2 or more df</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputed-computation-of-F-test-with-2-or-more-df/m-p/974717#M48899</link>
      <description>&lt;P&gt;John.King,&lt;/P&gt;
&lt;P&gt;If you want to pool these p-value, check " proc multtest":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/30/715.html" target="_blank"&gt;https://support.sas.com/kb/30/715.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Combining-LSMEANS-Output/m-p/957451#M47946" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/Combining-LSMEANS-Output/m-p/957451#M47946&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At second post,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/155173"&gt;@SAS_Rob&lt;/a&gt;&amp;nbsp;&amp;nbsp; showed you how to use proc multtest to pool p-value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 07:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputed-computation-of-F-test-with-2-or-more-df/m-p/974717#M48899</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-09-10T07:06:33Z</dc:date>
    </item>
  </channel>
</rss>

