<?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 Re: How do I obtain pairwise differences in proc mianalyze? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-obtain-pairwise-differences-in-proc-mianalyze/m-p/970723#M48775</link>
    <description>&lt;P&gt;You need to sort the Estimates data set by the label and then MIANALYZE BY LABEL to combine the results.&amp;nbsp; You should also use the DATA= input data set since it is not a data set of parameter estimates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add the following just after the GENMOD step&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=pairwise_estimates;;
by label _imputation_;
run;

proc mianalyze data=pairwise_estimates;;
by label;
modeleffects LBetaEstimate;
stderr stderr;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 14 Jul 2025 15:12:00 GMT</pubDate>
    <dc:creator>SAS_Rob</dc:creator>
    <dc:date>2025-07-14T15:12:00Z</dc:date>
    <item>
      <title>How do I obtain pairwise differences in proc mianalyze?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-obtain-pairwise-differences-in-proc-mianalyze/m-p/970720#M48774</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to analyze an imputed dataset. Everything runs okay except for proc mianalyze where I run into some problems. I am tyring to get pairwise differences of my class variable which has 3 categories.&lt;/P&gt;&lt;P&gt;Here is the code that I am using:&lt;/P&gt;&lt;P&gt;proc genmod data=mi_out;&lt;BR /&gt;by _imputation_;&lt;BR /&gt;/* Process each imputed dataset */&lt;BR /&gt;class matchid rand2;&lt;BR /&gt;/* 'matchid' identifies matched pairs,&lt;BR /&gt;'treatment' is the variable of interest */&lt;BR /&gt;model DIFF = rand2 / dist=normal;&lt;BR /&gt;/* 'outcome' is the continuous outcome */&lt;BR /&gt;repeated subject=matchid / type=cs;&lt;BR /&gt;/* Matched pairs, compound symmetry */&lt;/P&gt;&lt;P&gt;/* Define pairwise comparisons using ESTIMATE statements */&lt;BR /&gt;estimate 'rand2_1_vs_rand2_2' rand2 1 -1 0;&lt;BR /&gt;estimate 'rand2_1_vs_rand2_3' rand2 1 0 -1;&lt;BR /&gt;ods output estimates=pairwise_estimates; /* Save estimates */&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mianalyze parms=pairwise_estimates;&lt;BR /&gt;modeleffects rand2_1_vs_rand2_2 rand2_1_vs_rand2_3 ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the proc mianalyze, I get the following error:&lt;/P&gt;&lt;P&gt;ERROR: Variable PARAMETER, EFFECT, VARIABLE, PARM, or ROWNAME must be in the PARMS= data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can someone please help me understand why I am getting this error, or how I can obtain the pairwise differences?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 14:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-obtain-pairwise-differences-in-proc-mianalyze/m-p/970720#M48774</guid>
      <dc:creator>chepchep</dc:creator>
      <dc:date>2025-07-14T14:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I obtain pairwise differences in proc mianalyze?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-obtain-pairwise-differences-in-proc-mianalyze/m-p/970723#M48775</link>
      <description>&lt;P&gt;You need to sort the Estimates data set by the label and then MIANALYZE BY LABEL to combine the results.&amp;nbsp; You should also use the DATA= input data set since it is not a data set of parameter estimates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add the following just after the GENMOD step&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=pairwise_estimates;;
by label _imputation_;
run;

proc mianalyze data=pairwise_estimates;;
by label;
modeleffects LBetaEstimate;
stderr stderr;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Jul 2025 15:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-obtain-pairwise-differences-in-proc-mianalyze/m-p/970723#M48775</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2025-07-14T15:12:00Z</dc:date>
    </item>
  </channel>
</rss>

