<?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 Cost Analysis - Log Transform and Smearing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Cost-Analysis-Log-Transform-and-Smearing/m-p/840257#M332252</link>
    <description>&lt;P&gt;I am completing a cost analysis using a log transformation I.E. log(cost) = treatment. I am interested in testing for the marginal difference between treatments. I can easily find the marginal log(cost) for each treatment group. Three questions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If I exponentiate the marginal log(cost) for each treatment, is that a biased estimator of cost?&lt;/LI&gt;
&lt;LI&gt;Can I exponentiate the log(cost) for each treatment and find the difference to estimate the difference between treatments?&lt;/LI&gt;
&lt;LI&gt;If either 1 or 2 is biased, how do I use a smearing estimator?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I have the SAS code below. The top table is the SAS output followed by my work to exponentiate the log(cost) for each treatment and calculating the difference. Appreciate the help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC glm DATA=cost_data;
class Treatment (REF='1');
MODEL log_cost = treatment;
ESTIMATE 'Treatment 1' INTERCEPT 1 treatment 1 0;
ESTIMATE 'Treatment 0' INTERCEPT 1&amp;nbsp;treatment 0 1;
RUN;QUIT;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;TABLE style="border-collapse: collapse; width: 240pt;" border="0" width="320" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;Parameter&lt;/TD&gt;
&lt;TD width="77.7344px" class="xl65" style="border-left: none; width: 48pt;"&gt;Estimate&lt;/TD&gt;
&lt;TD width="75.9375px" class="xl65" style="border-left: none; width: 48pt;"&gt;Standard&lt;/TD&gt;
&lt;TD width="59.9375px" class="xl65" style="border-left: none; width: 48pt;"&gt;t&amp;nbsp;Value&lt;/TD&gt;
&lt;TD width="60.3906px" class="xl65" style="border-left: none; width: 48pt;"&gt;Pr&amp;nbsp;&amp;gt;&amp;nbsp;|t|&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="77.7344px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="75.9375px" class="xl65" style="border-top: none; border-left: none;"&gt;Error&lt;/TD&gt;
&lt;TD width="59.9375px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" align="right" class="xl65" style="height: 15.0pt; border-top: none;"&gt;Treatment 1&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;11.315&lt;/TD&gt;
&lt;TD width="75.9375px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0.01456&lt;/TD&gt;
&lt;TD width="59.9375px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;551.1&lt;/TD&gt;
&lt;TD width="60.3906px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" align="right" class="xl65" style="height: 15.0pt; border-top: none;"&gt;Treatment 0&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;11.05746&lt;/TD&gt;
&lt;TD width="75.9375px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0.03548&lt;/TD&gt;
&lt;TD width="59.9375px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;442.32&lt;/TD&gt;
&lt;TD width="60.3906px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" style="height: 15.0pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="77.7344px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt;"&gt;exp(0)&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-left: none;"&gt;82043.1&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;exp(1)&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;63415.27&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" style="height: 15.0pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="77.7344px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt;"&gt;Diff&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-left: none;"&gt;18627.83&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Mon, 24 Oct 2022 12:54:49 GMT</pubDate>
    <dc:creator>JonKetchup</dc:creator>
    <dc:date>2022-10-24T12:54:49Z</dc:date>
    <item>
      <title>Cost Analysis - Log Transform and Smearing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cost-Analysis-Log-Transform-and-Smearing/m-p/840257#M332252</link>
      <description>&lt;P&gt;I am completing a cost analysis using a log transformation I.E. log(cost) = treatment. I am interested in testing for the marginal difference between treatments. I can easily find the marginal log(cost) for each treatment group. Three questions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If I exponentiate the marginal log(cost) for each treatment, is that a biased estimator of cost?&lt;/LI&gt;
&lt;LI&gt;Can I exponentiate the log(cost) for each treatment and find the difference to estimate the difference between treatments?&lt;/LI&gt;
&lt;LI&gt;If either 1 or 2 is biased, how do I use a smearing estimator?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I have the SAS code below. The top table is the SAS output followed by my work to exponentiate the log(cost) for each treatment and calculating the difference. Appreciate the help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC glm DATA=cost_data;
class Treatment (REF='1');
MODEL log_cost = treatment;
ESTIMATE 'Treatment 1' INTERCEPT 1 treatment 1 0;
ESTIMATE 'Treatment 0' INTERCEPT 1&amp;nbsp;treatment 0 1;
RUN;QUIT;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;TABLE style="border-collapse: collapse; width: 240pt;" border="0" width="320" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;Parameter&lt;/TD&gt;
&lt;TD width="77.7344px" class="xl65" style="border-left: none; width: 48pt;"&gt;Estimate&lt;/TD&gt;
&lt;TD width="75.9375px" class="xl65" style="border-left: none; width: 48pt;"&gt;Standard&lt;/TD&gt;
&lt;TD width="59.9375px" class="xl65" style="border-left: none; width: 48pt;"&gt;t&amp;nbsp;Value&lt;/TD&gt;
&lt;TD width="60.3906px" class="xl65" style="border-left: none; width: 48pt;"&gt;Pr&amp;nbsp;&amp;gt;&amp;nbsp;|t|&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="77.7344px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="75.9375px" class="xl65" style="border-top: none; border-left: none;"&gt;Error&lt;/TD&gt;
&lt;TD width="59.9375px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" align="right" class="xl65" style="height: 15.0pt; border-top: none;"&gt;Treatment 1&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;11.315&lt;/TD&gt;
&lt;TD width="75.9375px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0.01456&lt;/TD&gt;
&lt;TD width="59.9375px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;551.1&lt;/TD&gt;
&lt;TD width="60.3906px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" align="right" class="xl65" style="height: 15.0pt; border-top: none;"&gt;Treatment 0&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;11.05746&lt;/TD&gt;
&lt;TD width="75.9375px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0.03548&lt;/TD&gt;
&lt;TD width="59.9375px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;442.32&lt;/TD&gt;
&lt;TD width="60.3906px" class="xl65" style="border-top: none; border-left: none;"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" style="height: 15.0pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="77.7344px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt;"&gt;exp(0)&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-left: none;"&gt;82043.1&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;exp(1)&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-top: none; border-left: none;"&gt;63415.27&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" style="height: 15.0pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="77.7344px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="85.7031px" height="20" class="xl65" style="height: 15.0pt;"&gt;Diff&lt;/TD&gt;
&lt;TD width="77.7344px" align="right" class="xl65" style="border-left: none;"&gt;18627.83&lt;/TD&gt;
&lt;TD width="75.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="59.9375px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="60.3906px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Mon, 24 Oct 2022 12:54:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cost-Analysis-Log-Transform-and-Smearing/m-p/840257#M332252</guid>
      <dc:creator>JonKetchup</dc:creator>
      <dc:date>2022-10-24T12:54:49Z</dc:date>
    </item>
  </channel>
</rss>

