<?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: Obtaining calculcated percentage from proc miananalyze in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-calculcated-percentage-from-proc-miananalyze/m-p/519386#M26448</link>
    <description>&lt;P&gt;I did face this same problem when I was working on a project. The reason why mianalyze&amp;nbsp;does not give a single estimate for percentage across imputations is that percentage calculations do not have a&amp;nbsp;standard error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you could do instead is to report the&amp;nbsp;percentage across all&amp;nbsp;n (number) imputations (removing the by statement in your proc freq code). But you cannot report # observations in each group still. Hope it helps.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Dec 2018 09:20:45 GMT</pubDate>
    <dc:creator>Rajesh3</dc:creator>
    <dc:date>2018-12-07T09:20:45Z</dc:date>
    <item>
      <title>Obtaining calculcated percentage from proc miananalyze</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-calculcated-percentage-from-proc-miananalyze/m-p/519253#M26443</link>
      <description>&lt;P&gt;Hi, I have a dataset with 5 groups where I needed to&amp;nbsp;impute some missing observations. I want to make a contingency table (on all subjects with and without imputed values) giving the distribution in absolute number and percentage of some variables of interest&amp;nbsp;by group (proc freq table with chisq test if I had no missing data).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, I&amp;nbsp;have been&amp;nbsp;able to get a test for between group differences and groupwise estimates for difference from the reference group using the code below. But how can I get an estimate of the calculated percentages from proc mianalyze in each group?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to ask for lsmeans in proc logistic but get the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: The model does not have a GLM parameterization. This parameterization is required for&lt;BR /&gt;the LSMEANS, LSMESTIMATE, and SLICE statement. These statements are ignored&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my full code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveyimpute data=have method=hotdeck(selection=abb)&lt;BR /&gt;ndonors=5 seed=773269;&lt;BR /&gt;var x1 x2 x3 x4 x5;&lt;BR /&gt;cells imputecell;&lt;BR /&gt;output out=ABB;&lt;BR /&gt;id id;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data DAIMP;&lt;BR /&gt;set ABB;&lt;BR /&gt;if (ImpIndex = 0) then do;&lt;BR /&gt;do _Imputation_=1 to 5;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;else do;&amp;nbsp;&lt;BR /&gt;_Imputation_ = ImpIndex;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sort data=DAIMP;&lt;BR /&gt;by _Imputation_ ImpIndex;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods select none;&lt;BR /&gt;proc surveylogistic data=DAIMP;&lt;BR /&gt;by _imputation_;&lt;BR /&gt;class treatment&amp;nbsp;group;&lt;BR /&gt;model &lt;SPAN&gt;treatment&lt;/SPAN&gt;=&lt;SPAN&gt;group&lt;/SPAN&gt; / covb;&lt;BR /&gt;ods output parameterestimates=Estimates covb=Covariances;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods select all;&lt;/P&gt;&lt;P&gt;proc mianalyze parms(classvar=classval)=Estimates&lt;BR /&gt;covb(effectvar=stacking)=Covariances&lt;BR /&gt;edf=25;&lt;BR /&gt;class group;&lt;BR /&gt;modeleffects Intercept group;&lt;BR /&gt;ods output parameterestimates=ABBLogisticAnalysis;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods select none;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc logistic data=DAIMP;&lt;BR /&gt;class group(order=internal);&lt;BR /&gt;model treatment(event='1')= group / covb; /* this gives at test for between group differences in treatment with&amp;nbsp;&lt;BR /&gt;by _Imputation_;&lt;BR /&gt;ods output ParameterEstimates=lgsparms;&lt;BR /&gt;run;&lt;BR /&gt;ods select all;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mianalyze parms(classvar=classval)=lgsparms;&lt;BR /&gt;modeleffects group;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 19:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-calculcated-percentage-from-proc-miananalyze/m-p/519253#M26443</guid>
      <dc:creator>greveam</dc:creator>
      <dc:date>2018-12-06T19:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining calculcated percentage from proc miananalyze</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-calculcated-percentage-from-proc-miananalyze/m-p/519274#M26444</link>
      <description>&lt;P&gt;For the error that you are receiving in logistic you can use param=GLM in the class statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Pasta DJ. Parameterizing Models to Test the Hypotheses You Want: Coding Indicator Variables and Modified Continuous Variables. &lt;A href="http://www2.sas.com/proceedings/sugi30/212-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/212-30.pdf&lt;/A&gt;. Accessed December 6, 2018.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-calculcated-percentage-from-proc-miananalyze/m-p/519274#M26444</guid>
      <dc:creator>Rajesh3</dc:creator>
      <dc:date>2018-12-06T20:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining calculcated percentage from proc miananalyze</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-calculcated-percentage-from-proc-miananalyze/m-p/519383#M26447</link>
      <description>&lt;P&gt;Thanks. But SAS won't estimate calculated percentages because there are no standard error estimates on the reference group.&amp;nbsp;Proc freq might be a solution using something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods trace on;&lt;BR /&gt;proc freq data=DAIMP;&lt;BR /&gt;table treatment*group / CROSSLIST(STDRES);&lt;BR /&gt;by _Imputation_;&lt;BR /&gt;run;&lt;BR /&gt;ods trace off;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how can I get the calculated #observations and percentages of treatment*group from&amp;nbsp;proc mianalyze?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 09:04:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-calculcated-percentage-from-proc-miananalyze/m-p/519383#M26447</guid>
      <dc:creator>greveam</dc:creator>
      <dc:date>2018-12-07T09:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining calculcated percentage from proc miananalyze</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-calculcated-percentage-from-proc-miananalyze/m-p/519386#M26448</link>
      <description>&lt;P&gt;I did face this same problem when I was working on a project. The reason why mianalyze&amp;nbsp;does not give a single estimate for percentage across imputations is that percentage calculations do not have a&amp;nbsp;standard error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you could do instead is to report the&amp;nbsp;percentage across all&amp;nbsp;n (number) imputations (removing the by statement in your proc freq code). But you cannot report # observations in each group still. Hope it helps.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 09:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtaining-calculcated-percentage-from-proc-miananalyze/m-p/519386#M26448</guid>
      <dc:creator>Rajesh3</dc:creator>
      <dc:date>2018-12-07T09:20:45Z</dc:date>
    </item>
  </channel>
</rss>

