<?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 Calculating Cohen's d from multiply imputed data in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-Cohen-s-d-from-multiply-imputed-data/m-p/926381#M46078</link>
    <description>&lt;P&gt;Hi everyone, apologies if this has been asked but I couldn't find an answer for my specific question. I wanted to get confirmation that what I am doing is appropriate. I have 20 imputed datasets. The grouping variable (2 groups) is called "condition". To compute pooled means across the imputed datasets I used the estimate statement in PROC MIXED for each level of condition:&lt;/P&gt;&lt;P&gt;ODS TRACE ON;&lt;BR /&gt;ODS OUTPUT SolutionF=solutionf Estimates =est3;&lt;/P&gt;&lt;P&gt;PROC MIXED data=data noclprint covtest method=ml;&lt;/P&gt;&lt;P&gt;class tid pid condition (ref='0');&lt;/P&gt;&lt;P&gt;model totalscore=condition/solution ddfm=bw;&lt;/P&gt;&lt;P&gt;random intercept/sub=tid type=un;&lt;/P&gt;&lt;P&gt;estimate "Intercept: 0" intercept 1 condition 0 1;&lt;BR /&gt;estimate "Intercept: 1" intercept 1 condition 1 0 ;&lt;BR /&gt;estimate "Intercept: 1-0" intercept 0 condition 1 -1 ;&lt;/P&gt;&lt;P&gt;store out=model;&lt;/P&gt;&lt;P&gt;by _Imputation_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;proc mianalyze data=est3;&lt;/P&gt;&lt;P&gt;modeleffects Estimate;&lt;/P&gt;&lt;P&gt;stderr stderr;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;For example, let's say this procedure gave me pooled estimates (means) of 8 for condition=0 and 7 for condition=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I calculated pooled SD using proc ttest and mianalyze:&lt;/P&gt;&lt;P&gt;proc ttest data=data;&lt;BR /&gt;class condition;&lt;BR /&gt;var totalscore;&lt;BR /&gt;by _Imputation_;&lt;BR /&gt;ods output statistics=ttest_ds&lt;BR /&gt;run;&lt;BR /&gt;proc sort data=ttest_ds;&lt;BR /&gt;by class _Imputation_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*The dataset ttest_ds has Class variables of 0 and 1 (for the groups) and "Diff (1-2)" Pooled and Satterthwaite. It also has columns for StdDev and StdErr by Imputation for the two classes.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data subset;&lt;BR /&gt;set ttest_ds;&lt;BR /&gt;where Class='0'; /*switch to 1 for condition=1*/&lt;BR /&gt;run;&lt;BR /&gt;proc mianalyze data=subset;&lt;BR /&gt;by class;&lt;BR /&gt;modeleffects stddev;&lt;BR /&gt;stderr stderr;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gave me pooled SDs of, for example, 5.8 for condition=0 and 5.6 for condition=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I calculated Cohen's d:&lt;/P&gt;&lt;P&gt;data cd;&lt;BR /&gt;mean_diff_rand1 = 8 - 7; /* pooled means for conditions = 0 and 1*/&lt;BR /&gt;pooled_std_dev_rand1 = sqrt((5.8**2 + 5.6**2) / 2); /* pooled SDs for conditions = 0 and 1 */&lt;BR /&gt;d_rand1 = mean_diff_rand1 / pooled_std_dev_rand1;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=cd; /*printing result*/&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this is enough information. Thank you kindly in advance!&lt;/P&gt;</description>
    <pubDate>Mon, 29 Apr 2024 19:30:01 GMT</pubDate>
    <dc:creator>statshuevo</dc:creator>
    <dc:date>2024-04-29T19:30:01Z</dc:date>
    <item>
      <title>Calculating Cohen's d from multiply imputed data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-Cohen-s-d-from-multiply-imputed-data/m-p/926381#M46078</link>
      <description>&lt;P&gt;Hi everyone, apologies if this has been asked but I couldn't find an answer for my specific question. I wanted to get confirmation that what I am doing is appropriate. I have 20 imputed datasets. The grouping variable (2 groups) is called "condition". To compute pooled means across the imputed datasets I used the estimate statement in PROC MIXED for each level of condition:&lt;/P&gt;&lt;P&gt;ODS TRACE ON;&lt;BR /&gt;ODS OUTPUT SolutionF=solutionf Estimates =est3;&lt;/P&gt;&lt;P&gt;PROC MIXED data=data noclprint covtest method=ml;&lt;/P&gt;&lt;P&gt;class tid pid condition (ref='0');&lt;/P&gt;&lt;P&gt;model totalscore=condition/solution ddfm=bw;&lt;/P&gt;&lt;P&gt;random intercept/sub=tid type=un;&lt;/P&gt;&lt;P&gt;estimate "Intercept: 0" intercept 1 condition 0 1;&lt;BR /&gt;estimate "Intercept: 1" intercept 1 condition 1 0 ;&lt;BR /&gt;estimate "Intercept: 1-0" intercept 0 condition 1 -1 ;&lt;/P&gt;&lt;P&gt;store out=model;&lt;/P&gt;&lt;P&gt;by _Imputation_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;proc mianalyze data=est3;&lt;/P&gt;&lt;P&gt;modeleffects Estimate;&lt;/P&gt;&lt;P&gt;stderr stderr;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;For example, let's say this procedure gave me pooled estimates (means) of 8 for condition=0 and 7 for condition=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I calculated pooled SD using proc ttest and mianalyze:&lt;/P&gt;&lt;P&gt;proc ttest data=data;&lt;BR /&gt;class condition;&lt;BR /&gt;var totalscore;&lt;BR /&gt;by _Imputation_;&lt;BR /&gt;ods output statistics=ttest_ds&lt;BR /&gt;run;&lt;BR /&gt;proc sort data=ttest_ds;&lt;BR /&gt;by class _Imputation_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*The dataset ttest_ds has Class variables of 0 and 1 (for the groups) and "Diff (1-2)" Pooled and Satterthwaite. It also has columns for StdDev and StdErr by Imputation for the two classes.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data subset;&lt;BR /&gt;set ttest_ds;&lt;BR /&gt;where Class='0'; /*switch to 1 for condition=1*/&lt;BR /&gt;run;&lt;BR /&gt;proc mianalyze data=subset;&lt;BR /&gt;by class;&lt;BR /&gt;modeleffects stddev;&lt;BR /&gt;stderr stderr;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gave me pooled SDs of, for example, 5.8 for condition=0 and 5.6 for condition=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I calculated Cohen's d:&lt;/P&gt;&lt;P&gt;data cd;&lt;BR /&gt;mean_diff_rand1 = 8 - 7; /* pooled means for conditions = 0 and 1*/&lt;BR /&gt;pooled_std_dev_rand1 = sqrt((5.8**2 + 5.6**2) / 2); /* pooled SDs for conditions = 0 and 1 */&lt;BR /&gt;d_rand1 = mean_diff_rand1 / pooled_std_dev_rand1;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=cd; /*printing result*/&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this is enough information. Thank you kindly in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 19:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-Cohen-s-d-from-multiply-imputed-data/m-p/926381#M46078</guid>
      <dc:creator>statshuevo</dc:creator>
      <dc:date>2024-04-29T19:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Cohen's d from multiply imputed data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-Cohen-s-d-from-multiply-imputed-data/m-p/926449#M46082</link>
      <description>&lt;P&gt;My suggestion would be to calculate Cohen's D and its standard error for each imputed data set and then use Proc MIANALYZE to get the combined estimate.&lt;/P&gt;
&lt;P&gt;You can find several variations of the standard error calculation here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.stackexchange.com/questions/495015/what-is-the-formula-for-the-standard-error-of-cohens-d" target="_blank"&gt;effect size - What is the formula for the standard error of Cohen's d - Cross Validated (stackexchange.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would be a simpler approach than what you are taking I believe.&amp;nbsp; Plus, I think the last MIANALYZE step is wrong since the standard error you are supplying is not for the standard deviation which is the statistic you are combining.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc mianalyze data=subset;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by class;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;modeleffects stddev;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;stderr stderr;*this is not the standard error for the standard deviation;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 12:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-Cohen-s-d-from-multiply-imputed-data/m-p/926449#M46082</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2024-04-30T12:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Cohen's d from multiply imputed data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-Cohen-s-d-from-multiply-imputed-data/m-p/926483#M46084</link>
      <description>&lt;P&gt;I see, that makes sense. Thank you so much for your helpful response!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 15:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-Cohen-s-d-from-multiply-imputed-data/m-p/926483#M46084</guid>
      <dc:creator>statshuevo</dc:creator>
      <dc:date>2024-04-30T15:31:39Z</dc:date>
    </item>
  </channel>
</rss>

