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

I need help to combine (MIANALYZE) the data below.  Specifically, I need the pooled TRT*SUBGROUP interaction p-value.

                                                                                                                                              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    <.0001
  2          1         subgroup             2      418.288785      209.144393    Var(Residual) + Q(subgroup,trt*subgroup)    MS(Residual)       294      58.12    <.0001
  3          1         trt*subgroup         2       21.702703       10.851351    Var(Residual) + Q(trt*subgroup)             MS(Residual)       294       3.02    0.0505
  4          1         Residual           294     1058.009621        3.598672    Var(Residual)                               .                    .        .       .    

I have the solution and understand that for a 1 df test it would be the same as T-test.  I think MIANALYSE can pool the solution, but I don't know if I can compute the trt*subgroup test from the pooled solution. 

Obs    _Imputation_    Effect            trt      subgroup    Estimate      StdErr      DF     tValue     Probt

  1          1         Intercept                               11.0516      0.2449     294      45.13    <.0001
  2          1         trt             Active                   2.3972      0.3817     294       6.28    <.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           .       .        .       .    

This is my example data.  

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') < 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;
1 ACCEPTED SOLUTION

Accepted Solutions
SAS_Rob
SAS Employee

MIANALYZE can only combine individual point estimates and cannot be used to combine F-tests specifically.  The theory itself is not very well-developed for combining multiple DF tests, especially Type 3 tests from MIXED, since Rubin’s Rules apply directly to parameter estimates and their variances, not to F-statistics.  

MIANALYZE does have a TEST statement and through the MULT option you can get a joint test based on the combined parameter estimates.  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.  Whether that is statistically valid or not however is not clear however.

View solution in original post

2 REPLIES 2
SAS_Rob
SAS Employee

MIANALYZE can only combine individual point estimates and cannot be used to combine F-tests specifically.  The theory itself is not very well-developed for combining multiple DF tests, especially Type 3 tests from MIXED, since Rubin’s Rules apply directly to parameter estimates and their variances, not to F-statistics.  

MIANALYZE does have a TEST statement and through the MULT option you can get a joint test based on the combined parameter estimates.  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.  Whether that is statistically valid or not however is not clear however.

Ksharp
Super User

John.King,

If you want to pool these p-value, check " proc multtest":

 

https://support.sas.com/kb/30/715.html


https://communities.sas.com/t5/Statistical-Procedures/Combining-LSMEANS-Output/m-p/957451#M47946

 

At second post, @SAS_Rob   showed you how to use proc multtest to pool p-value.

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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