<?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: Proc mixed: Between-subject CV% one-way ANOVA in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Between-subject-CV-one-way-ANOVA/m-p/658123#M31527</link>
    <description>&lt;P&gt;In this model, the between subject variability is characterized by the RESIDUAL variance, since you are doing an OLS solution (due to the method=type3 option).&amp;nbsp; The model does not have a within-subject structure, so that is not presented.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, when you divide the residual standard deviation by the treatment means, you get different CV's for each treatment.&amp;nbsp; That is not surprising, and in fact, exactly what I would expect, as the model assumes a constant variance by group, and you have one value divided successively by 3 different values.&amp;nbsp; Consequently, I think your macro is doing exactly what the data tells us.&amp;nbsp; You will have to explain why you think something different should occur, and then we could perhaps come up with an alternative.&amp;nbsp; And by the way, the variable se_exp is not the standard error of estim_exp.&amp;nbsp; Consider this: estim = 2, se =0.2.&amp;nbsp; Applying your formulas, I get estim_exp = 7.389 and&amp;nbsp; se_exp=1.221.&amp;nbsp; Note that se_exp is bounded below by 1, whereas the standard error of data with a mean of 2 is bounded below by 0, as n goes to infinity.&amp;nbsp; Check some references for a proper conversion - the formula will be almost identical to the one you have for CV_inter_geometric (divided by sqrt(N))..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, since this is in log space, you are implicitly making the assumption that the CV is identical for all treatment groups - it is a multiplicative model, and the standard deviation is in a constant ratio to the mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to use PROC GENMOD on your untransformed data to get the information you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jun 2020 17:03:13 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-06-12T17:03:13Z</dc:date>
    <item>
      <title>Proc mixed: Between-subject CV% one-way ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Between-subject-CV-one-way-ANOVA/m-p/649898#M31519</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do an one-way ANOVA with a proc mixed to can do estimates. I have in my model only the treatment group and my variable to explain is in log. I need to have the between subject variability but I don't know if it's correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My model is :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro model(PARAM);&lt;BR /&gt;proc mixed data=ANOVA_TMP method=type3 ;&lt;BR /&gt;class usubjid TRTA_TMP;&lt;BR /&gt;model &amp;amp;PARAM= TRTA_TMP / s alpha=0.10 ddfm=kr ;&lt;BR /&gt;estimate "b versus A " TRTA_TMP -1 1 0 / cl alpha=0.10 ;&lt;BR /&gt;estimate " c versus b" TRTA_TMP 0 -1 1 / cl alpha=0.10 ;&lt;BR /&gt;lsmeans TRTA_TMP / cl alpha=0.05;&lt;/P&gt;
&lt;P&gt;ods output estimates=_Estim;&lt;BR /&gt;ods output lsmeans=_LSMEANS;&lt;BR /&gt;ods output Type3=_Type3;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _Estim;&lt;BR /&gt;set _Estim;&lt;BR /&gt;estim_exp=exp(Estimate);&lt;BR /&gt;se_exp=exp(StdErr);&lt;/P&gt;
&lt;P&gt;ci_inf_exp=exp(lower);&lt;BR /&gt;ci_sup_exp=exp(upper);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _LSMEANS;&lt;BR /&gt;set _LSMEANS;&lt;BR /&gt;estim_exp=exp(Estimate);&lt;BR /&gt;ci_inf_exp=exp(lower);&lt;BR /&gt;ci_sup_exp=exp(upper);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _Type3;&lt;BR /&gt;set _Type3;&lt;BR /&gt;std_log=sqrt(MS);&lt;BR /&gt;CV_inter_geometric=((exp(std_log**2)-1)**(1/2))*100;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With this way, I obtain a CV%inter group (and not between-subject) equal to 37% but in each group I have an CV% respectively, 20.7% ; 30.6% and 13% so i think that it's not constistent. Could you help me please ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 08:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Between-subject-CV-one-way-ANOVA/m-p/649898#M31519</guid>
      <dc:creator>Clg</dc:creator>
      <dc:date>2020-06-12T08:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Between-subject CV% one-way ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Between-subject-CV-one-way-ANOVA/m-p/657964#M31520</link>
      <description>&lt;P&gt;Re-titled and moved the &lt;EM&gt;procedures&lt;/EM&gt; forum.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 08:45:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Between-subject-CV-one-way-ANOVA/m-p/657964#M31520</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-06-12T08:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: Between-subject CV% one-way ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Between-subject-CV-one-way-ANOVA/m-p/658123#M31527</link>
      <description>&lt;P&gt;In this model, the between subject variability is characterized by the RESIDUAL variance, since you are doing an OLS solution (due to the method=type3 option).&amp;nbsp; The model does not have a within-subject structure, so that is not presented.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, when you divide the residual standard deviation by the treatment means, you get different CV's for each treatment.&amp;nbsp; That is not surprising, and in fact, exactly what I would expect, as the model assumes a constant variance by group, and you have one value divided successively by 3 different values.&amp;nbsp; Consequently, I think your macro is doing exactly what the data tells us.&amp;nbsp; You will have to explain why you think something different should occur, and then we could perhaps come up with an alternative.&amp;nbsp; And by the way, the variable se_exp is not the standard error of estim_exp.&amp;nbsp; Consider this: estim = 2, se =0.2.&amp;nbsp; Applying your formulas, I get estim_exp = 7.389 and&amp;nbsp; se_exp=1.221.&amp;nbsp; Note that se_exp is bounded below by 1, whereas the standard error of data with a mean of 2 is bounded below by 0, as n goes to infinity.&amp;nbsp; Check some references for a proper conversion - the formula will be almost identical to the one you have for CV_inter_geometric (divided by sqrt(N))..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, since this is in log space, you are implicitly making the assumption that the CV is identical for all treatment groups - it is a multiplicative model, and the standard deviation is in a constant ratio to the mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to use PROC GENMOD on your untransformed data to get the information you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 17:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Between-subject-CV-one-way-ANOVA/m-p/658123#M31527</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-06-12T17:03:13Z</dc:date>
    </item>
  </channel>
</rss>

