<?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 How to pool from proc ttest in  proc mianalyze in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970522#M48763</link>
    <description>&lt;P&gt;Using the commands below, I managed to impute and then do a t-test. But it fails to get the pooled estimate because I keep getting error messages. I have already looked in the manual of ‘proc mianalyze’, but I cannot find any examples that shows the mean, standard deviation and confidence intervals.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc mi data= b1 nimpute=25 out=out1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var x1..Xn;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;fcs regpmm(x1..Xn); &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc ttest data=out1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;by _imputation_;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;class classvar;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;var x1..Xn;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ods output statistics=out2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have an example of how this should be done, or is there a publication where I could extract this.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Edmund&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jul 2025 13:49:08 GMT</pubDate>
    <dc:creator>EdmuRS</dc:creator>
    <dc:date>2025-07-10T13:49:08Z</dc:date>
    <item>
      <title>How to pool from proc ttest in  proc mianalyze</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970522#M48763</link>
      <description>&lt;P&gt;Using the commands below, I managed to impute and then do a t-test. But it fails to get the pooled estimate because I keep getting error messages. I have already looked in the manual of ‘proc mianalyze’, but I cannot find any examples that shows the mean, standard deviation and confidence intervals.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc mi data= b1 nimpute=25 out=out1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var x1..Xn;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;fcs regpmm(x1..Xn); &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc ttest data=out1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;by _imputation_;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;class classvar;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;var x1..Xn;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ods output statistics=out2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have an example of how this should be done, or is there a publication where I could extract this.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Edmund&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 13:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970522#M48763</guid>
      <dc:creator>EdmuRS</dc:creator>
      <dc:date>2025-07-10T13:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to pool from proc ttest in  proc mianalyze</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970523#M48764</link>
      <description>&lt;P&gt;Below is an example that shows the necessary syntax for combining the Proc TTEST results.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*Create a sample data set to work with*/
data test;

do grp=1 to 2;
do rep=1 to 25;
if rand('UNIFORM')&amp;gt;.7 then y=.;
else y=rand('NORMAL',.66*grp,1);
output;
end;
end;
run;
proc mi data=test out=mi_test seed=1;
class grp;
var grp y;
monotone regression;
run;


/*This code would work for the difference in two means*/
proc ttest data=mi_test;
class grp;
by _imputation_;
var y;
ods output statistics=ttest_ds;
run;

proc sort data=ttest_ds;
by class _imputation_;
run;
proc mianalyze data=ttest_ds;
by class;
modeleffects mean;
stderr stderr;
run;


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Jul 2025 14:26:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970523#M48764</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2025-07-10T14:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to pool from proc ttest in  proc mianalyze</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970524#M48765</link>
      <description>&lt;P&gt;Thank you very much SAS_Rob for this quick answer.&lt;BR /&gt;But my problem is that I have multiple variables and in your example there is only one variable.&lt;BR /&gt;Is there any way to get the estimates of multiple variables along with the standard error and confidence intervals&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Edmund&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 14:53:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970524#M48765</guid>
      <dc:creator>EdmuRS</dc:creator>
      <dc:date>2025-07-10T14:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to pool from proc ttest in  proc mianalyze</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970527#M48766</link>
      <description>&lt;P&gt;Thank you very much SAS_Rob for this quick answer.&lt;BR /&gt;But my problem is that I have multiple variables in the proc ttest (X1..Xn) (see above) and in your example there is only one variable.&lt;BR /&gt;Is there any way to get the estimates of multiple variables in proc mianalyze along with the standard error and confidence intervals&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edmund&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 15:07:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970527#M48766</guid>
      <dc:creator>EdmuRS</dc:creator>
      <dc:date>2025-07-10T15:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to pool from proc ttest in  proc mianalyze</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970528#M48767</link>
      <description>&lt;P&gt;You will just need to add VARIABLE to the Proc SORT and the BY statement in MIANALYZE.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;

do grp=1 to 2;
do rep=1 to 25;
if rand('UNIFORM')&amp;gt;.7 then y=.;
else y=rand('NORMAL',.66*grp,1);
if rand('UNIFORM')&amp;gt;.78 then y2=.;
else y2=rand('NORMAL',.3*grp,1);

output;
end;
end;
run;
proc mi data=test out=mi_test seed=1 nimpute=5;
class grp;
var grp y y2;
fcs regression;
run;


/*This code would work for the difference in two means*/
proc ttest data=mi_test;
class grp;
by _imputation_;
var y y2;
ods output statistics=ttest_ds;
run;

proc sort data=ttest_ds;
by variable class _imputation_;
run;

proc mianalyze data=ttest_ds;
by variable class;
modeleffects mean;
stderr stderr;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Jul 2025 15:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-pool-from-proc-ttest-in-proc-mianalyze/m-p/970528#M48767</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2025-07-10T15:19:57Z</dc:date>
    </item>
  </channel>
</rss>

