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;
... View more